FrankChen021 commented on code in PR #19704:
URL: https://github.com/apache/druid/pull/19704#discussion_r3830380575


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/StreamingPartitionsSpec.java:
##########
@@ -55,7 +56,21 @@ public interface StreamingPartitionsSpec
    * segment's shard spec with it at publish time. Returns {@code null} when 
this spec is configured such that there is
    * nothing to collect (e.g. no dimensions), in which case no collector runs 
and segments are published unchanged.
    * One collector is created per task run.
+   *
+   * @param dimensionsSpec the task's declared dimensions, or {@code null} if 
none; lets a strategy consult per-dimension
+   *                       schema (e.g. to enable type-gated numeric pruning 
for {@code LONG} dimensions).
    */
   @Nullable
-  StreamingShardSpecCollector createCollector();
+  StreamingShardSpecCollector createCollector(@Nullable DimensionsSpec 
dimensionsSpec);

Review Comment:
   [P2] New abstract method breaks existing implementations
   
   Adding createCollector(DimensionsSpec) as a new abstract interface method 
breaks existing custom StreamingPartitionsSpec implementations: they no longer 
compile, and already-compiled implementations can throw AbstractMethodError 
when SeekableStreamIndexTaskRunner invokes the new method. The default no-arg 
bridge only preserves callers, not implementors. Make the new overload a 
default that delegates to createCollector(), or otherwise retain a default 
compatibility path while allowing the built-in spec to use DimensionsSpec.



-- 
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