kgyrtkirk commented on code in PR #17039:
URL: https://github.com/apache/druid/pull/17039#discussion_r1759395306
##########
sql/src/test/quidem/org.apache.druid.sql.calcite.DecoupledPlanningCalciteQueryTest/testGroupByWithLiteralInSubqueryGrouping@NullHandling=sql.iq:
##########
@@ -30,8 +30,8 @@ SELECT
+-------+----+
| t1 | t2 |
+-------+----+
-| dummy | |
| dummy | b |
+| dummy | |
Review Comment:
I wasn't taking a closer look as its a grouping on `t1,t2` so it looked
okayish :)
its very strange as even the native query is the same for the 2 variants -
no idea why its different
<details>
<summary>diff</summary>
```
dev@decouple-joins:~/druid$ diff -Naur -U30 `f
testGroupByWithLiteralInSubqueryGrouping*iq`
---
./sql/src/test/quidem/org.apache.druid.sql.calcite.DecoupledPlanningCalciteQueryTest/testGroupByWithLiteralInSubqueryGrouping@NullHandling=sql.iq
2024-09-13 19:29:16.364090523 +0000
+++
./sql/src/test/quidem/org.apache.druid.sql.calcite.DecoupledPlanningCalciteQueryTest/testGroupByWithLiteralInSubqueryGrouping@NullHandling=default.iq
2024-09-13 09:08:49.372218528 +0000
@@ -1,64 +1,64 @@
-# testGroupByWithLiteralInSubqueryGrouping@NullHandling=sql
case-crc:a63c5a2f
+# testGroupByWithLiteralInSubqueryGrouping@NullHandling=default
case-crc:a63c5a2f
# quidem testcase reason: IMPROVED_PLAN
!set debug true
!set defaultTimeout 300000
!set maxScatterGatherBytes 9223372036854775807
!set plannerStrategy DECOUPLED
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
!set sqlQueryId dummy
!set outputformat mysql
!use druidtest:///
SELECT
t1, t2
FROM
( SELECT
'dummy' as t1,
CASE
WHEN
dim4 = 'b'
THEN dim4
ELSE NULL
END AS t2
FROM
numfoo
GROUP BY
dim4
)
GROUP BY
t1,t2
;
+-------+----+
| t1 | t2 |
+-------+----+
-| dummy | b |
| dummy | |
+| dummy | b |
+-------+----+
(2 rows)
!ok
LogicalProject(t1=['dummy'], t2=[$0])
LogicalAggregate(group=[{0}])
LogicalProject(t2=[CASE(=($0, 'b'), $0, null:VARCHAR)])
LogicalAggregate(group=[{4}])
LogicalTableScan(table=[[druid, numfoo]])
!logicalPlan
DruidProject(t1=['dummy'], t2=[$0], druid=[logical])
DruidAggregate(group=[{0}], druid=[logical])
DruidProject(t2=[CASE(=($0, 'b'), $0, null:VARCHAR)], druid=[logical])
DruidAggregate(group=[{4}], druid=[logical])
DruidTableScan(table=[[druid, numfoo]], druid=[logical])
!druidPlan
{
"queryType" : "groupBy",
"dataSource" : {
"type" : "query",
"query" : {
"queryType" : "groupBy",
"dataSource" : {
"type" : "table",
"name" : "numfoo"
},
"intervals" : {
"type" : "intervals",
```
</details>
--
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]