cecemei commented on code in PR #17055:
URL: https://github.com/apache/druid/pull/17055#discussion_r1759576836
##########
processing/src/main/java/org/apache/druid/query/filter/Filter.java:
##########
@@ -31,12 +31,27 @@
import org.apache.druid.segment.vector.VectorColumnSelectorFactory;
import javax.annotation.Nullable;
+import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
@SubclassesMustOverrideEqualsAndHashCode
public interface Filter
{
+ default String getFilterString()
+ {
+ return toString();
+ }
+
+ /**
+ * Returns a LinkedHashSet of all child filters for this filter with no
duplicates.
+ * <p>The ordering of child filters is important in some cases,
e.x.short-curcuiting.</p>
+ */
+ default LinkedHashSet<Filter> getFilters()
+ {
+ return new LinkedHashSet<>();
+ }
Review Comment:
actually ended up using `ImmutableSet` since filter is not comparable, and
`ImmutableSet` is ordered so that seems enough.
--
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]