chenyuzhi459 commented on a change in pull request #11060:
URL: https://github.com/apache/druid/pull/11060#discussion_r606082928
##########
File path: sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
##########
@@ -17086,4 +17086,32 @@ public void testGroupingSetsWithLimitOrderByGran()
throws Exception
).build()
);
}
+
+
+ @Test
+ public void testLookupWithNull() throws Exception
+ {
+ testQuery(
+ "SELECT dim2 ,lookup(dim2,'lookyloo') from foo where dim2 is null",
+ ImmutableList.of(
+ new Druids.ScanQueryBuilder()
+ .dataSource(CalciteTests.DATASOURCE1)
+ .intervals(querySegmentSpec(Filtration.eternity()))
+ .virtualColumns(
+ expressionVirtualColumn("v0", "null", ValueType.STRING)
+ )
+ .columns("v0")
+ .legacy(false)
+ .filters(new SelectorDimFilter("dim2", "", null))
+ .resultFormat(ScanQuery.ResultFormat.RESULT_FORMAT_COMPACTED_LIST)
+ .context(QUERY_CONTEXT_DEFAULT)
+ .build()
+ ),
+ ImmutableList.<Object[]>builder().add(
+ new Object[]{"", NULL_STRING},
+ new Object[]{"", NULL_STRING},
+ new Object[]{"", NULL_STRING}
Review comment:
Thanks for reminding me. I have changed dimension `dim2` to `dim1` to
fix it.
It seems failing CI agained because of some network trouble, should I fix
it ?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]