You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/12/16 18:32:18 UTC

[GitHub] [incubator-druid] suneet-s commented on a change in pull request #8775: Fix NPE for subquery with limit

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

 ##########
 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:
   I don't think I understand the exception here. The error message talks about a subquery with a limit clause, but it looks like we're checking if the subQuery can not be converted to a group by query.
   
   ^ Sorry if this is a dumb question, I'm new here :)

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


With regards,
Apache Git Services

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