gianm commented on a change in pull request #8566: Upgrade Calcite to 1.21
URL: https://github.com/apache/incubator-druid/pull/8566#discussion_r348717641
##########
File path: sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
##########
@@ -1919,7 +1927,15 @@ public void testNullEmptyStringEquality() throws
Exception
.dataSource(CalciteTests.DATASOURCE1)
.intervals(querySegmentSpec(Filtration.eternity()))
.granularity(Granularities.ALL)
- .filters(expressionFilter("case_searched((\"dim2\" ==
'a'),1,isnull(\"dim2\"))"))
+ .filters(
+ or(
+ selector("dim2", "a", null),
+ and(
+ selector("dim2", null, null),
+ not(selector("dim2", "a", null))
+ )
+ )
+ )
Review comment:
The new filter is `dim2 = 'a' OR (dim2 IS NULL AND dim2 != 'a')`. It seems a
bit… weird. Ideally it should be simplified to `dim2 = 'a' OR dim2 IS NULL`.
It's fine for now, but could you add a comment about this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]