gianm commented on a change in pull request #8775: Fix NPE for subquery with 
limit
URL: https://github.com/apache/incubator-druid/pull/8775#discussion_r341681386
 
 

 ##########
 File path: sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
 ##########
 @@ -7344,6 +7344,36 @@ public void testUsingSubqueryWithExtractionFns() throws 
Exception
     );
   }
 
+  @Test
+  public void testUsingSubqueryWithLimit() throws Exception
+  {
+    testQuery(
+        "SELECT COUNT(*) AS cnt FROM ( SELECT * FROM druid.foo LIMIT 10 ) 
tmpA",
 
 Review comment:
   Whoa, this looks wrong. The query doesn't have a native query and it returns 
an empty result set.
   
   I think that probably, this query should return an error, because it 
represents a kind of query structure Druid can't do right now (aggregation on 
top of a non-aggregating subquery).

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to