gianm commented on code in PR #18092:
URL: https://github.com/apache/druid/pull/18092#discussion_r2132973283
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteLookupFunctionQueryTest.java:
##########
@@ -768,7 +776,7 @@ public void testFilterMvOverlapNull()
buildFilterTestSql("MV_OVERLAP(lookup(dim1, 'lookyloo'), ARRAY['xabc',
'x6', 'nonexistent', NULL])"),
QUERY_CONTEXT,
buildFilterTestExpectedQuery(
- in("dim1", Arrays.asList(null, "nonexistent", "x6", "xabc"),
EXTRACTION_FN)
+
expressionFilter("mv_overlap(lookup(\"dim1\",'lookyloo'),array('xabc','x6','nonexistent',null))")
Review Comment:
I think this change is going to make the `MV_OVERLAP` SQL call in this test
case perform worse, since IIRC the expression filter isn't able to use indexes
for `mv_overlap` (because it has array inputs). The old plan with an `in`
filter was able to use indexes.
Calls like this are pretty common, they're how you do something like "check
if the result of the lookup is any of the following values". I'd like to think
about how to keep this being able to use indexes. If expressions could use
indexes directly that would make this easier.
--
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]