Skip to content

Commit 5d08d3d

Browse files
committed
PARQUET-34: Add comment for shouldUpdateDelegate
1 parent c555fa2 commit 5d08d3d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

parquet-column/src/main/java/org/apache/parquet/filter2/recordlevel/IncrementallyUpdatedFilterPredicate.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,15 @@ public void reset() {
227227
class CountingValueInspector extends ValueInspector {
228228
private long observedValueCount;
229229
private final ValueInspector delegate;
230+
231+
/**
232+
* Triggering function to update the underlying delegate. We want to be careful not to trigger before
233+
* all relevant column values have been considered.
234+
*
235+
* For example, given the predicate `size(col, LT, 3)` and a record with 4 array values, we don't want the
236+
* underlying `lt(3)` predicate to be evaluated on the first or second elements of the array, since it would
237+
* return a premature True value.
238+
*/
230239
private final Function<Long, Boolean> shouldUpdateDelegate;
231240

232241
public CountingValueInspector(ValueInspector delegate, Function<Long, Boolean> shouldUpdateDelegate) {

0 commit comments

Comments
 (0)