abhishekagarwal87 commented on code in PR #13151:
URL: https://github.com/apache/druid/pull/13151#discussion_r982255912
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java:
##########
@@ -998,6 +998,56 @@ public void testStringLatestGroupBy()
);
}
+ @Test
+ public void testStringLatestGroupByWithAlwaysFalseCondition()
+ {
+ testQuery(
+ "SELECT LATEST(dim4, 10),dim2 FROM numfoo WHERE (dim1 = 'something'
AND dim1 IN( 'something else') ) GROUP BY dim2",
+ ImmutableList.of(
+ Druids.newScanQueryBuilder()
+ .dataSource(InlineDataSource.fromIterable(
+ ImmutableList.of(),
+ RowSignature.builder()
+ .add("EXPR$0", ColumnType.STRING)
+ .add("dim2", ColumnType.STRING)
+ .build()
+ ))
+ .intervals(querySegmentSpec(Filtration.eternity()))
+ .columns("EXPR$0", "dim2")
+ .context(QUERY_CONTEXT_DEFAULT)
+ .resultFormat(ResultFormat.RESULT_FORMAT_COMPACTED_LIST)
+ .legacy(false)
+ .build()
+ ),
+ ImmutableList.of()
+ );
+ }
+
+ @Test
+ public void testStringLatestByGroupByWithAlwaysFalseCondition()
Review Comment:
I was not able to figure out a query that gets me that error message. This
query is not an invalid query. It just goes through a bad stage and doesn't
recover before this fix. Now it can.
--
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]