You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "cryptoe (via GitHub)" <gi...@apache.org> on 2023/09/04 11:00:12 UTC
Re: [PR] Unnest now works on MSQ (druid)
cryptoe commented on code in PR #14886:
URL: https://github.com/apache/druid/pull/14886#discussion_r1314797152
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/DataSourcePlan.java:
##########
@@ -347,6 +373,92 @@ private static DataSourcePlan forQuery(
);
}
+ private static DataSourcePlan forFilteredDataSource(
+ final QueryKit queryKit,
+ final String queryId,
+ final QueryContext queryContext,
+ final FilteredDataSource dataSource,
+ final QuerySegmentSpec querySegmentSpec,
+ final int maxWorkerCount,
+ final int minStageNumber,
+ final boolean broadcast
+ )
+ {
+ final QueryDefinitionBuilder subQueryDefBuilder = QueryDefinition.builder();
+ final DataSourcePlan basePlan = forDataSource(
+ queryKit,
+ queryId,
+ queryContext,
+ dataSource.getBase(),
+ querySegmentSpec,
+ null,
+ maxWorkerCount,
+ Math.max(minStageNumber, subQueryDefBuilder.getNextStageNumber()),
+ broadcast
+ );
+
+ DataSource newDataSource = basePlan.getNewDataSource();
+ basePlan.getSubQueryDefBuilder().ifPresent(subQueryDefBuilder::addAll);
+
+ final List<InputSpec> inputSpecs = new ArrayList<>(basePlan.getInputSpecs());
+ newDataSource = FilteredDataSource.create(newDataSource, dataSource.getFilter());
+ return new DataSourcePlan(
+ newDataSource,
+ inputSpecs,
+ broadcast ? IntOpenHashSet.of(0) : IntSets.emptySet(),
Review Comment:
Why is this 0 ?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org