clintropolis commented on code in PR #18342:
URL: https://github.com/apache/druid/pull/18342#discussion_r2245071887
##########
processing/src/main/java/org/apache/druid/segment/AggregateProjectionMetadata.java:
##########
@@ -554,9 +616,73 @@ public String toString()
", aggregators=" + Arrays.toString(aggregators) +
", ordering=" + ordering +
", timeColumnPosition=" + timeColumnPosition +
- ", granularity=" + granularity +
+ ", effectiveGranularity=" + effectiveGranularity +
", orderingWithTimeSubstitution=" + orderingWithTimeSubstitution +
'}';
}
}
+
+ /**
+ * Rewrites a query {@link Filter} if possible, removing the {@link Filter}
of a projection. To match a projection
+ * filter, the query filter must be equal to the projection filter, or must
contain the projection filter as the child
+ * of an AND filter. This method returns null
+ * indicating that a rewrite is impossible with the implication that the
query cannot use the projection because the
+ * projection doesn't contain all the rows the query would match if not
using the projection.
+ */
+ @Nullable
+ public static Filter rewriteFilter(@Nullable Filter projectionFilter,
@Nullable Filter queryFilter)
+ {
+ if (projectionFilter == null || queryFilter == null) {
Review Comment:
oops, not anymore
--
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]