clintropolis commented on a change in pull request #6883: Deprecate 
NoneShardSpec
URL: https://github.com/apache/incubator-druid/pull/6883#discussion_r250816786
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/timeline/DataSegment.java
 ##########
 @@ -146,7 +146,7 @@ public DataSegment(
     // dataSource
     this.dimensions = prepareDimensionsOrMetrics(dimensions, 
DIMENSIONS_INTERNER);
     this.metrics = prepareDimensionsOrMetrics(metrics, METRICS_INTERNER);
-    this.shardSpec = (shardSpec == null) ? NoneShardSpec.instance() : 
shardSpec;
+    this.shardSpec = (shardSpec == null) ? new NumberedShardSpec(0, 1) : 
shardSpec;
 
 Review comment:
   I guess I was more thinking of the impact through `DataSegment.Builder()` 
which with this change [will now create a new object in the 
constructor](https://github.com/apache/incubator-druid/pull/6883/files#diff-93f2cf9022ac4126afc3ee5989f4f5bfR376)
 to set the default before it is likely later replaced when the actual shard 
spec is set before completing the build, instead of the previous behavior of 
re-using the same object.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to