kfaraz commented on code in PR #17899:
URL: https://github.com/apache/druid/pull/17899#discussion_r2052061061


##########
server/src/main/java/org/apache/druid/client/selector/HistoricalFilter.java:
##########
@@ -0,0 +1,39 @@
+package org.apache.druid.client.selector;
+
+import com.google.common.collect.ImmutableSet;
+import it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap;
+import org.apache.druid.client.QueryableDruidServer;
+
+import java.util.Set;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+public class HistoricalFilter implements 
Function<Int2ObjectRBTreeMap<Set<QueryableDruidServer>>, 
Int2ObjectRBTreeMap<Set<QueryableDruidServer>>>

Review Comment:
   Oh, using a set is not a requirement, I just wrote it like that for 
simplicity. Same goes for the enum arg too.
   
   In essence, we should just make `HistoricalFilter` an interface with some 
filtration method rather than just using a `Function<A, B>` and have the view 
class be an implementation of `HistoricalFilter`. It would be a cleaner design 
that is easier to follow and test.



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