jon-wei commented on a change in pull request #10843:
URL: https://github.com/apache/druid/pull/10843#discussion_r574932098
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java
##########
@@ -202,6 +205,16 @@ public CompactionTask(
this.dimensionsSpec = dimensionsSpec == null ? dimensions : dimensionsSpec;
this.metricsSpec = metricsSpec;
this.segmentGranularity = segmentGranularity;
+ if (granularitySpec == null && segmentGranularity != null) {
+ this.granularitySpec = new UniformGranularitySpec(
+ segmentGranularity,
+ null,
+ null,
+ null
+ );
+ } else {
+ this.granularitySpec = granularitySpec;
Review comment:
I'm not sure if we have a consistent stance on this but I think several
places throw an exception if both the deprecated and new property are specified
(such as `Checks.checkOneNotNullOrEmpty` usages).
I don't feel strongly about it, so I'm just mentioning this in case you feel
that's a better approach.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]