{
//equality & null
String query = "a = load 'a' as (t1 : int);"
+ "b = filter a by null == t1;";
CastExpression castExp = getCastFromLastFilter(query);
assertNotNull("cast ", castExp);
assertEquals("cast type", DataType.INTEGER, castExp.getType());
}
{
//equality & null & complex type
String query = "a = load 'a' as (t1 : (i : int));"
+ "b = filter a by null == t1;";
CastExpression castExp = getCastFromLastFilter(query);
assertNotNull("cast ", castExp);
assertEquals("cast type", DataType.TUPLE, castExp.getType());
}
{
String query = "a = load 'a' as (t1 : int);"
+ "b = filter a by t1 <= null;";
CastExpression castExp = getCastFromLastFilter(query);
assertNotNull("cast ", castExp);
assertEquals("cast type", DataType.INTEGER, castExp.getType());
}
}