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

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidOuterQueryRel.java
 ##########
 @@ -128,9 +129,14 @@ public DruidQuery toDruidQuery(final boolean 
finalizeAggregations)
       return null;
     }
 
+    final GroupByQuery groupByQuery = subQuery.toGroupByQuery();
+    if (groupByQuery == null) {
+      throw new CannotBuildQueryException("Subquery with limit clause is not 
supported");
 
 Review comment:
   Indeed, it sounds better, thanks 👍 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to