UnaryPredicateOperator { private static FunctionResolver isNull() { return FunctionDSL .define(BuiltinFunctionName.IS_NULL.getName(), Arrays.stream(ExprCoreType.values()) .map(type -> FunctionDSL .impl((v) -> ExprBooleanValue.of(v.isNull()), BOOLEAN, type)) .collect( Collectors.toList())); }  static void register(BuiltinFunctionRepository repository); ExprValue not(ExprValue v);  }
@Test public void is_null_predicate() { FunctionExpression expression = dsl.isnull(DSL.literal(1)); assertEquals(BOOLEAN, expression.type()); assertEquals(LITERAL_FALSE, expression.valueOf(valueEnv())); expression = dsl.isnull(DSL.literal(ExprNullValue.of())); assertEquals(BOOLEAN, expression.type()); assertEquals(LITERAL_TRUE, expression.valueOf(valueEnv())); }