builder.addField(getField(2, "test", bigIntType));
final BatchSchema schema = builder.build();
new NonStrictExpectations() {
{
batch.getValueVectorId(new FieldReference("test", ExpressionPosition.UNKNOWN));
result = new TypedFieldId(Types.required(MinorType.BIGINT), -5);
}
};
ErrorCollector ec = new ErrorCollectorImpl();
LogicalExpression expr = ExpressionTreeMaterializer.materialize(new FieldReference("test",
ExpressionPosition.UNKNOWN), batch, ec);
assertEquals(bigIntType, expr.getMajorType());
assertFalse(ec.hasErrors());
}