gargvishesh commented on code in PR #16778:
URL: https://github.com/apache/druid/pull/16778#discussion_r1695161872


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:
##########
@@ -485,7 +488,8 @@ static Map<Interval, DataSchema> 
createDataSchemasForIntervals(
       @Nullable final ClientCompactionTaskTransformSpec transformSpec,
       @Nullable final AggregatorFactory[] metricsSpec,
       @Nullable final ClientCompactionTaskGranularitySpec granularitySpec,
-      final ServiceMetricEvent.Builder metricBuilder
+      final ServiceMetricEvent.Builder metricBuilder,
+      CompactionRunner compactionRunner

Review Comment:
   Agree. Will do this in the next PR since it requires updating many tests 
which use this as a static function without creating a `CompactionTask`.



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:
##########
@@ -604,13 +610,17 @@ private static DataSchema createDataSchema(
       @Nullable DimensionsSpec dimensionsSpec,
       @Nullable ClientCompactionTaskTransformSpec transformSpec,
       @Nullable AggregatorFactory[] metricsSpec,
-      @Nonnull ClientCompactionTaskGranularitySpec granularitySpec
+      @Nonnull ClientCompactionTaskGranularitySpec granularitySpec,
+      @Nullable CompactionRunner compactionRunner
   )
   {
     // Check index metadata & decide which values to propagate (i.e. carry 
over) for rollup & queryGranularity
     final ExistingSegmentAnalyzer existingSegmentAnalyzer = new 
ExistingSegmentAnalyzer(
         segments,
-        granularitySpec.isRollup() == null,
+        // For MSQ, always need rollup to check if there are some rollup 
segments already present.
+        compactionRunner == null || compactionRunner instanceof 
NativeCompactionRunner

Review Comment:
   Removed the 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]

Reply via email to