siddharthteotia commented on code in PR #10248:
URL: https://github.com/apache/pinot/pull/10248#discussion_r1118357976
##########
pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTestBase.java:
##########
@@ -109,6 +109,21 @@ protected Object[][] provideQueries() {
new Object[]{"SELECT a.col1, SUM(a.col3) OVER (ORDER BY a.col2,
a.col1), MIN(a.col3) OVER (ORDER BY a.col2, "
+ "a.col1) FROM a"},
new Object[]{"SELECT a.col1, SUM(a.col3) OVER (ORDER BY a.col2),
MIN(a.col3) OVER (ORDER BY a.col2) FROM a"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col1,
SUM(a.col3) FROM a WHERE a.col3 >= 0"
+ + " AND a.col2 = 'a' GROUP BY a.col1"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col1,
COUNT(*) FROM a WHERE a.col3 >= 0 "
+ + "AND a.col2 = 'a' GROUP BY a.col1"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col2,
a.col1, SUM(a.col3) FROM a WHERE a"
+ + ".col3 >= 0 AND a.col1 = 'a' GROUP BY a.col1, a.col2"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col1,
AVG(b.col3) FROM a JOIN b ON a.col1 "
+ + "= b.col2 WHERE a.col3 >= 0 AND a.col2 = 'a' AND b.col3 < 0
GROUP BY a.col1"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col1 as
v1, a.col1 as v2, AVG(a.col3) FROM"
+ + " a GROUP BY v1, v2"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col2,
COUNT(*), SUM(a.col3), SUM(a.col1) "
+ + "FROM a WHERE a.col3 >= 0 AND a.col2 = 'a' GROUP BY a.col2
HAVING COUNT(*) > 10 AND MAX(a.col3) >= 0 "
+ + "AND MIN(a.col3) < 20 AND SUM(a.col3) <= 10 AND AVG(a.col3) =
5"},
+ new Object[]{"SELECT /*+ skipLeafStageGroupByAggregation */ a.col2,
a.col3 FROM a JOIN b ON a.col1 = b"
Review Comment:
I wonder if using this hint for this query is a NO-OP ? I mean in this case,
GROUP BY is on top of JOIN, so this particular hint's purpose is not applicable
?
Curious what does the plan look like for this query with and without the
hint ?
--
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]