tarun11Mavani commented on code in PR #13792:
URL: https://github.com/apache/pinot/pull/13792#discussion_r1713158034


##########
pinot-common/src/test/java/org/apache/pinot/sql/parsers/rewriter/NonAggregationGroupByToDistinctQueryRewriterTest.java:
##########
@@ -53,13 +53,23 @@ private void testQueryRewrite(String original, String 
expected) {
 
   @Test
   public void testUnsupportedQueries() {
-    testUnsupportedQuery("SELECT col1 FROM foo GROUP BY col1, col2");
     testUnsupportedQuery("SELECT col1, col2 FROM foo GROUP BY col1");
-    testUnsupportedQuery("SELECT col1 + col2 FROM foo GROUP BY col1, col2");
+    testUnsupportedQuery("SELECT concat(col1, col2) FROM foo GROUP BY col1");

Review Comment:
   No. By default, this is not supported in SQL either. Every column in SELECT 
should be functionally dependent on columns in GROUP-BY. Mysql is throwing 
below error when I tried running it.  
   
   ERROR 1055 (42000) at line 13: Expression #2 of SELECT list is not in GROUP 
BY clause and contains nonaggregated column 'sandbox_db.testing_groupby.cnt' 
which is not functionally dependent on columns in GROUP BY clause; this is 
incompatible with sql_mode=only_full_group_by
   
   Note: This can be supported in mysql by disabling the only_full_group_by 
sql_mode but by default it is not supported.
   
   These type of queries are not supported with Pinot Multi-stage engine either.
   



-- 
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]

Reply via email to