LakshSingla commented on code in PR #16854:
URL: https://github.com/apache/druid/pull/16854#discussion_r1722832097
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryKit.java:
##########
@@ -360,4 +354,36 @@ private QueryDefinitionBuilder
makeQueryDefinitionBuilder(String queryId, DataSo
}
return queryDefBuilder;
}
+
+ /**
+ * Computes the ClusterBy for the final window stage which may or may not
have the partition boosted column,
+ * depending on the {@code segmentGranularity} parameter passed. We don't
have to take the CLUSTERED BY
+ * columns into account, as they are handled as {@link
org.apache.druid.query.scan.ScanQuery#orderBys}.
+ */
+ private static ClusterBy computeClusterByForFinalWindowStage(Granularity
segmentGranularity)
Review Comment:
> Same reason why we are not adding it to all the window stages.
It is not the same reason. We aren't adding it to the other window stages
because that would be logically incorrect. Same keys should go to same worker,
irrespective of the partition size. It will be flawed if we break it up by
adding partition boosting. Boosting only makes sense in the last window stage
While the logic about adding an unnecessary column is correct, there can be
cases when a single time chunk (DAY/MONTH...) can have large amounts of data.
To wit, that case isn't any different from adding boosting when granularity =
ALL. Alternatively, why is ALL granularity unique when deciding whether or not
to add the boost column?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]