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

 ##########
 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:
   Since Druid can't support this type of query right now, I think this could 
throw a `CannotBuildQueryException` if the subquery can't be expressed as a 
groupBy here: 
https://github.com/apache/incubator-druid/pull/8775/files#diff-fbc88cca6610397d841e9b32a9a86f13R133
   
   

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