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_r340989614
 
 

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidOuterQueryRel.java
 ##########
 @@ -129,8 +131,10 @@ public DruidQuery toDruidQuery(final boolean 
finalizeAggregations)
     }
 
     final RowSignature sourceRowSignature = subQuery.getOutputRowSignature();
+    final GroupByQuery groupByQuery = subQuery.toGroupByQuery();
+    final DataSource dataSource = groupByQuery == null ? 
subQuery.getDataSource() : new QueryDataSource(groupByQuery);
 
 Review comment:
   Yep, this modification seems to be 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