use of com.yahoo.bullet.query.expressions.CastExpression in project bullet-core by yahoo.
the class CastEvaluatorTest method testConstructor.
@Test
public void testConstructor() {
CastExpression expression = new CastExpression(new ValueExpression(5), Type.STRING);
expression.setType(Type.STRING);
CastEvaluator evaluator = new CastEvaluator(expression);
Assert.assertTrue(evaluator.value instanceof ValueEvaluator);
Assert.assertEquals(evaluator.castType, Type.STRING);
Assert.assertEquals(evaluator.evaluate(RecordBox.get().getRecord()), new TypedObject(Type.STRING, "5"));
}
Aggregations