gianm commented on code in PR #18084:
URL: https://github.com/apache/druid/pull/18084#discussion_r2132006112
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteMultiValueStringQueryTest.java:
##########
@@ -316,6 +316,7 @@ public void testMultiValueStringOverlapFilterNonLiteral()
),
ImmutableList.of(
new Object[]{"[\"a\",\"b\"]"},
+ new Object[]{"[\"b\",\"c\"]"},
Review Comment:
This actually was a bad change. The root cause was:
- the `array(dim2)` function, when passed a `dim2` that is a single null,
would return an `array<long>` typed array with a single null in it.
- the `mv_overlap` function would then cast the first arg to `array<long>`,
which would yield an array of nulls.
- the `mv_overlap` function would then return true because an array of nulls
(first arg) does contain a null (second arg).
To fix it we'd need to cast for comparison. But I think that is sort of
pointless since `MV_CONTAINS` and `MV_OVERLAP` really only make sense with
strings. So instead, I updated them to cast the second arg to string array, and
updated the tests accordingly.
--
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]