Package org.apache.drill.exec.ref

Examples of org.apache.drill.exec.ref.UnbackedRecord


    List<UnbackedRecord> records = TestUtils.getResultAsUnbackedRecords("/order/nulls-first.json");

    DataValue[] depts = {DataValue.NULL_VALUE, new LongScalar(31), new LongScalar(33), new LongScalar(34)};
    SchemaPath dept = new SchemaPath("deptId", ExpressionPosition.UNKNOWN);
    for(int i =0; i < depts.length; i++){
      UnbackedRecord r = records.get(i);
      assertEquals(String.format("Invalid dept value for record %d.", i), depts[i], r.getField(dept));
    }
   
  }
View Full Code Here


    List<UnbackedRecord> records = TestUtils.getResultAsUnbackedRecords("/order/nulls-last.json");

    DataValue[] depts = {new LongScalar(31), new LongScalar(33), new LongScalar(34), DataValue.NULL_VALUE};
    SchemaPath dept = new SchemaPath("deptId", ExpressionPosition.UNKNOWN);
    for(int i =0; i < depts.length; i++){
      UnbackedRecord r = records.get(i);
      assertEquals(String.format("Invalid dept value for record %d.", i), depts[i], r.getField(dept));
    }
   
  }
View Full Code Here

    private UnbackedRecord record;
    private EvaluatorFactory factory;

    public JoinROP(Join config) {
        super(config);
        record = new UnbackedRecord();
    }
View Full Code Here

    DataValue[] depts = {DataValue.NULL_VALUE, new LongScalar(31), new LongScalar(33), new LongScalar(34)};
    DataValue[] cnts = {new LongScalar(1), new LongScalar(1), new LongScalar(2), new LongScalar(2)};
    SchemaPath typeCount = new SchemaPath("typeCount", ExpressionPosition.UNKNOWN);
    SchemaPath dept = new SchemaPath("deptId", ExpressionPosition.UNKNOWN);
    for(int i =0; i < depts.length; i++){
      UnbackedRecord r = records.get(i);
      assertEquals(String.format("Invalid dept value for record %d.", i), depts[i], r.getField(dept));
      assertEquals(String.format("Invalid type count value for record %d with deptId %s.", i, depts[i]), cnts[i], r.getField(typeCount));
    }
   
  }
View Full Code Here

  protected void doWork() {
    for(RecordIterator ri : incoming){
      RecordPointer rp = ri.getRecordPointer();
      while(ri.next() != NextOutcome.NONE_LEFT){
        UnbackedRecord r = new UnbackedRecord();
        r.copyFrom(rp);
        records.add(r);
      }
    }
    this.iterator = records.iterator();
  }
View Full Code Here

    private UnbackedRecord record;

    public ConstantROP(Constant config) {
        super(config);
        record = new UnbackedRecord();
    }
View Full Code Here

    String expr = "if( a == 1) then 4 else 2 end";
    ExprLexer lexer = new ExprLexer(new ANTLRStringStream(expr));
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    ExprParser parser = new ExprParser(tokens);
    LogicalExpression e = parser.parse().e;
    RecordPointer r = new UnbackedRecord();
    r.addField(new SchemaPath("a", ExpressionPosition.UNKNOWN), new IntegerScalar(3));
    SimpleEvaluationVisitor builder = new SimpleEvaluationVisitor(r);
    BasicEvaluator eval = e.accept(builder, null);
    DataValue v = eval.eval();
    System.out.println(v);
  }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.ref.UnbackedRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.