gianm commented on code in PR #18084:
URL: https://github.com/apache/druid/pull/18084#discussion_r2131548437
##########
processing/src/test/java/org/apache/druid/math/expr/FunctionTest.java:
##########
@@ -391,6 +391,73 @@ public void testArrayContains()
assertExpr("array_contains([1, null, 2], null)", 1L);
assertExpr("array_contains([1, null, 2], [null])", 1L);
assertExpr("array_contains([1, 2], null)", 0L);
+ assertExpr("array_contains([1, 2, 3], [])", 1L);
+ assertExpr("array_contains([], [])", 1L);
+ assertExpr("array_contains([null], [])", 1L);
+ assertExpr("array_contains(['foo', 'bar'], [])", 1L);
+ assertExpr("array_contains(null, [])", null);
+ }
+
+ @Test
+ public void testMvContains()
Review Comment:
Added some tests. I didn't use bindings, but I don't think they're needed,
because `assertExpr` tests both with and without single-threaded mode. Using
constants should let both modes be exercised.
--
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]