clintropolis commented on code in PR #17055:
URL: https://github.com/apache/druid/pull/17055#discussion_r1762032219
##########
processing/src/main/java/org/apache/druid/segment/QueryableIndexCursorHolder.java:
##########
@@ -112,6 +113,7 @@ public QueryableIndexCursorHolder(
Cursors.getTimeOrdering(ordering),
interval,
filter,
+
cursorBuildSpec.getQueryContext().getBoolean(QueryContexts.CURSOR_AUTO_ARRANGE_FILTERS,
false),
Review Comment:
we should probably default this to true, or are you planning to wait until
we have added the cost computations?
##########
processing/src/main/java/org/apache/druid/query/filter/Filter.java:
##########
@@ -37,6 +38,25 @@
@SubclassesMustOverrideEqualsAndHashCode
public interface Filter
{
+ default String getFilterString()
+ {
+ return toString();
+ }
+
+ /**
+ * Returns an ordered set of all child filters for this filter with no
duplicates. The default return value is an
+ * empty set.
+ * <p>
+ * Only {@link org.apache.druid.segment.filter.AndFilter} and {@link
org.apache.druid.segment.filter.OrFilter} have
+ * child filters. Other filters would return empty (including {@link
org.apache.druid.segment.filter.NotFilter}).
+ * <p>
+ * The ordering of child filters is important in some cases,
e.x.short-curcuiting.
+ */
+ default ImmutableSet<Filter> getFilters()
Review Comment:
I still can't stop thinking that this method is strange here... what do you
think about leaving this on `BooleanFilter` and just using `filter instance
BooleanFilter` in `FilterBundle.Builder`?
We also should keep this as a `LinkedHashSet` since if the context flag is
set to be off then the order specified is important because it was likely
manually set to override the filter re-arranging.
--
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]