use of org.apache.drill.exec.record.TypedFieldId in project drill by apache.
the class ExpressionTest method testSpecial.
@Test
public void testSpecial(@Injectable final RecordBatch batch, @Injectable ValueVector vector) throws Exception {
final TypeProtos.MajorType type = Types.optional(MinorType.INT);
final TypedFieldId tfid = new TypedFieldId(type, false, 0);
new NonStrictExpectations() {
@NonStrict
VectorWrapper<?> wrapper;
{
batch.getValueVectorId(new SchemaPath("alpha", ExpressionPosition.UNKNOWN));
result = tfid;
batch.getValueAccessorById(IntVector.class, tfid.getFieldIds());
result = wrapper;
wrapper.getValueVector();
result = new IntVector(MaterializedField.create("result", type), RootAllocatorFactory.newRoot(c));
}
};
System.out.println(getExpressionCode("1 + 1", batch));
}
Aggregations