@Test public void test_null_lte_missing() { FunctionExpression lte = dsl.lte(DSL.ref(INT_TYPE_NULL_VALUE_FIELD, INTEGER), DSL.ref(INT_TYPE_MISSING_VALUE_FIELD, INTEGER)); assertEquals(BOOLEAN, lte.type()); assertEquals(LITERAL_MISSING, lte.valueOf(valueEnv())); lte = dsl.lte(DSL.ref(INT_TYPE_MISSING_VALUE_FIELD, INTEGER), DSL.ref(INT_TYPE_NULL_VALUE_FIELD, INTEGER)); assertEquals(BOOLEAN, lte.type()); assertEquals(LITERAL_MISSING, lte.valueOf(valueEnv())); }
private static FunctionResolver lte() { return FunctionDSL .define(BuiltinFunctionName.LTE.getName(), ExprCoreType.coreTypes().stream() .map(type -> FunctionDSL .impl( FunctionDSL .nullMissingHandling( (v1, v2) -> ExprBooleanValue.of(v1.compareTo(v2) <= 0)), BOOLEAN, type, type)) .collect( Collectors.toList())); }
BinaryPredicateOperator { private static FunctionResolver lte() { return FunctionDSL .define(BuiltinFunctionName.LTE.getName(), ExprCoreType.coreTypes().stream() .map(type -> FunctionDSL .impl( FunctionDSL .nullMissingHandling( (v1, v2) -> ExprBooleanValue.of(v1.compareTo(v2) <= 0)), BOOLEAN, type, type)) .collect( Collectors.toList())); } }
BinaryPredicateOperator { private static FunctionResolver lte() { return FunctionDSL .define(BuiltinFunctionName.LTE.getName(), ExprCoreType.coreTypes().stream() .map(type -> FunctionDSL .impl( FunctionDSL .nullMissingHandling( (v1, v2) -> ExprBooleanValue.of(v1.compareTo(v2) <= 0)), BOOLEAN, type, type)) .collect( Collectors.toList())); }  }
BinaryPredicateOperator { private static FunctionResolver lte() { return FunctionDSL .define(BuiltinFunctionName.LTE.getName(), ExprCoreType.coreTypes().stream() .map(type -> FunctionDSL .impl( FunctionDSL .nullMissingHandling( (v1, v2) -> ExprBooleanValue.of(v1.compareTo(v2) <= 0)), BOOLEAN, type, type)) .collect( Collectors.toList())); }  static void register(BuiltinFunctionRepository repository); }
BinaryPredicateOperator { private static FunctionResolver lte() { return FunctionDSL .define(BuiltinFunctionName.LTE.getName(), ExprCoreType.coreTypes().stream() .map(type -> FunctionDSL .impl( FunctionDSL .nullMissingHandling( (v1, v2) -> ExprBooleanValue.of(v1.compareTo(v2) <= 0)), BOOLEAN, type, type)) .collect( Collectors.toList())); }  static void register(BuiltinFunctionRepository repository);  }