clintropolis commented on code in PR #18005:
URL: https://github.com/apache/druid/pull/18005#discussion_r2105673550


##########
processing/src/main/java/org/apache/druid/query/RestrictedDataSource.java:
##########
@@ -123,10 +122,9 @@ public boolean isProcessable()
   }
 
   @Override
-  public Function<SegmentReference, SegmentReference> 
createSegmentMapFunction(Query query)
+  public SegmentMapFunction createSegmentMapFunction(Query query)
   {
-    final Function<SegmentReference, SegmentReference> segmentMapFn = 
base.createSegmentMapFunction(query);
-    return baseSegment -> new 
RestrictedSegment(segmentMapFn.apply(baseSegment), policy);
+    return SegmentMapFunction.map(segment -> new RestrictedSegment(segment, 
policy));

Review Comment:
   I've done this with `RestrictedDataSource`, but not yet for 
`RestrictedInputNumberDataSource` since it currently doesn't have a reference 
to the base datasource like `RestrictedDataSource`, only an inputNumber and the 
policy. Should we update `RestrictedInputNumberDataSource` to be created with 
the base of the `RestrictedDataSource`? It looks like this was released in 33, 
but not sure how well documented stuff is yet.. in other words, if we change it 
would we need to worry about backwards compatibility?



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