somu-imply commented on code in PR #15974:
URL: https://github.com/apache/druid/pull/15974#discussion_r1504671535
##########
processing/src/main/java/org/apache/druid/math/expr/Function.java:
##########
@@ -3779,15 +3781,55 @@ public ExpressionType
getOutputType(Expr.InputBindingInspector inspector, List<E
}
@Override
- ExprEval doApply(ExprEval lhsExpr, ExprEval rhsExpr)
+ public ExprEval apply(List<Expr> args, Expr.ObjectBinding bindings)
{
- final Object[] array1 = lhsExpr.asArray();
- final Object[] array2 = rhsExpr.asArray();
- return
ExprEval.ofLongBoolean(Arrays.asList(array1).containsAll(Arrays.asList(array2)));
+ final ExprEval arrayExpr1 = args.get(0).eval(bindings);
+ final ExprEval arrayExpr2 = args.get(1).eval(bindings);
+
+ final Object[] array1 = arrayExpr1.asArray();
+ final Object[] array2 = arrayExpr2.asArray();
+ if (array1 == null) {
Review Comment:
So in these 2 cases, if the first argument is null, we follow 3VL and return
null. This might not be backward compatible with someone who is already
following the older version to return false.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]