gianm commented on code in PR #17664:
URL: https://github.com/apache/druid/pull/17664#discussion_r1930945253


##########
processing/src/main/java/org/apache/druid/segment/CursorBuildSpec.java:
##########
@@ -337,6 +444,38 @@ public CursorBuildSpecBuilder setQueryMetrics(@Nullable 
QueryMetrics<?> queryMet
       return this;
     }
 
+
+
+    /**
+     * Adds a {@link Filter} to the builder, if {@link #filter} is already 
set, the existing and new filters will be
+     * combined with an {@link org.apache.druid.segment.filter.AndFilter}. If 
{@link #physicalColumns} is set,
+     * {@link Filter#getRequiredColumns()} which are not present in {@link 
#virtualColumns} will be added to the
+     * existing set of {@link #physicalColumns}.
+     */
+    public CursorBuildSpecBuilder andFilter(

Review Comment:
   please include tests for this method specifically, exercising cases like:
   
   - `filter` is null, `filterToAdd` is nonnull
   - `filterToAdd` is null, `filterToAdd` is null
   - both filters are nonnull
   - the `filterToAdd` references a column that the previous build spec doesn't 
reference



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