adarshsanjeev commented on code in PR #13205:
URL: https://github.com/apache/druid/pull/13205#discussion_r1025060077
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/kernel/controller/ControllerStageTracker.java:
##########
@@ -234,23 +224,31 @@ WorkerInputs getWorkerInputs()
return workerInputs;
}
+ /**
+ * Returns the merged key statistics.
+ */
+ @Nullable
+ public CompleteKeyStatisticsInformation getCompleteKeyStatisticsInformation()
+ {
+ return completeKeyStatisticsInformation;
+ }
+
/**
* Adds result key statistics for a particular worker number. If statistics
have already been added for this worker,
* then this call ignores the new ones and does nothing.
*
* @param workerNumber the worker
- * @param snapshot worker statistics
+ * @param partialKeyStatisticsInformation partial key statistics
*/
- ControllerStagePhase addResultKeyStatisticsForWorker(
+ ControllerStagePhase addPartialKeyStatisticsForWorker(
final int workerNumber,
- final ClusterByStatisticsSnapshot snapshot
+ final PartialKeyStatisticsInformation partialKeyStatisticsInformation
)
{
if (phase != ControllerStagePhase.READING_INPUT) {
throw new ISE("Cannot add result key statistics from stage [%s]", phase);
}
-
- if (resultKeyStatisticsCollector == null) {
+ if (!stageDef.doesShuffle() || completeKeyStatisticsInformation == null) {
Review Comment:
Added a check
--
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]