context = context == null ? "" : context;
ImmutableBytesWritable ptr = new ImmutableBytesWritable();
assertTrue(expression.evaluate(null, ptr));
PDataType dataType = expression.getDataType();
ColumnModifier columnModifier = expression.getColumnModifier();
Object result = dataType.toObject(ptr.get(), ptr.getOffset(), ptr.getLength(), dataType, columnModifier);
assertEquals(context, expectedResult, result);
}
private Expression getLiteral(Object value) throws Exception {
return LiteralExpression.newConstant(value);