{
//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", castExp.getType(), DataType.INTEGER);
}
{
//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", castExp.getType(), DataType.TUPLE);
}
{
String query = "a = load 'a' as (t1 : int) ;"
+ "b = filter a by t1 <= null;";
CastExpression castExp = getCastFromLastFilter(query);
assertNotNull("cast ", castExp);
assertEquals("cast type", castExp.getType(), DataType.INTEGER);
}
}