Skip to content
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
27978f0
Changed RegionedColumnSourceBase to handle single column filters and …
lbooker42 Feb 5, 2026
d44e00d
Lots more work, allowing column region and table locatiop pushdown op…
lbooker42 Feb 10, 2026
73adb07
Addressed copilot PR comments.
lbooker42 Feb 10, 2026
3b67e34
Improved and consolidated RowKeyAgnosticChunkSource filtering.
lbooker42 Feb 12, 2026
163f4c7
Cleanup and spotless
lbooker42 Feb 12, 2026
557eae2
Support for ColumnRegion Constant and Null regions and tests.
lbooker42 Feb 17, 2026
43e895d
Merge branch 'main' into nightly/DH-21522-parquettablelocation
lbooker42 Feb 17, 2026
8dc65e6
Updated the new test to use QueryTable disables rather than burying u…
lbooker42 Feb 17, 2026
0450746
Update test to reflect new reality.
lbooker42 Feb 17, 2026
e5e9e1f
Coordinated changes to allow Core+ optimizations.
lbooker42 Feb 24, 2026
5afc2ae
Merge branch 'main' into nightly/DH-21522-parquettablelocation
lbooker42 Feb 24, 2026
fda03ee
Final co-pilot suggestion.
lbooker42 Feb 24, 2026
4c8f2de
Use createNull for new null regions.
lbooker42 Feb 25, 2026
49dcf57
Minor changes from co-pilot.
lbooker42 Feb 25, 2026
3464b4a
Consolidation of repeated code.
lbooker42 Feb 25, 2026
ece9334
More cleanup
lbooker42 Feb 25, 2026
bcb14f0
WIP
lbooker42 Feb 25, 2026
7358204
Lots of self-review.
lbooker42 Feb 25, 2026
d9f08a8
Changes to the column region classes
lbooker42 Feb 26, 2026
76e8df6
Rework filter contexts.
lbooker42 Feb 26, 2026
9eb02f7
Correct failing test, more cleanup in the filter contexts.
lbooker42 Feb 26, 2026
f94919f
Revert RCF to not include ExposesChunkFilter.
lbooker42 Feb 26, 2026
7a6c143
Correct test and verify coverage.
lbooker42 Feb 27, 2026
0ef8684
Final copilot PR comments addressed.
lbooker42 Feb 27, 2026
5117682
Changes to improve coverage.
lbooker42 Feb 28, 2026
62c13dc
Spotless :(
lbooker42 Feb 28, 2026
c7d9fd8
PT comments addressed.
lbooker42 Mar 5, 2026
6d61d59
Re-worked predicate pushdown costs, added config for customer adjustm…
lbooker42 Mar 10, 2026
7f08ff4
Initial commit of sorted match and range filter pushdown.
lbooker42 Mar 24, 2026
533288e
Cleanup and improvement for range filtering row set intersection.
lbooker42 Mar 24, 2026
16430ff
Implemented WhereFilterDelegating interface, updated RowSetCapturingF…
lbooker42 Mar 24, 2026
c0f05c9
Addressed PR comments
lbooker42 Apr 7, 2026
bfa3430
Updated pushdown costs, re-ordered and renamed.
lbooker42 Apr 15, 2026
0d63333
Merge branch 'nightly/DH-21522-parquettablelocation' into nightly/DH-…
lbooker42 Apr 20, 2026
bb96bc9
Updated to match latest changes in parent repo, handle match filter i…
lbooker42 Apr 21, 2026
c968f0c
Added columnLocation retrieval to column region as optional
lbooker42 Apr 22, 2026
ae4537d
Using region column location instead of the location-providing context.
lbooker42 Apr 22, 2026
2cf70b4
Using region column location instead of the location-providing contex…
lbooker42 Apr 22, 2026
425649a
Cleanup and documentation improvements.
lbooker42 Apr 22, 2026
7050ce3
Some PR comments addressed.
lbooker42 Apr 22, 2026
76b2d7e
Merge remote-tracking branch 'origin/nightly/DH-21522-parquettableloc…
lbooker42 Apr 22, 2026
428d962
Refactor RegionedPushdownAction, small fixes.
lbooker42 Apr 23, 2026
400e18f
Add pushdown to sub-regions to static page stores, updated RegionedCo…
lbooker42 Apr 23, 2026
0d528f6
Merge remote-tracking branch 'origin/nightly/DH-21522-parquettableloc…
lbooker42 Apr 23, 2026
bce97a6
Cleanup, handle renames.
lbooker42 Apr 23, 2026
3a96b21
Merge branch 'main' into nightly/DH-21493-sorted-pushdown
lbooker42 Apr 27, 2026
dcfe983
Can't binsearch when filter case-insensitive. Corrected many tests.
lbooker42 Apr 27, 2026
b770d9a
Cleanup
lbooker42 Apr 27, 2026
d8abd52
Addressing PR comments, improving code coverage.
lbooker42 Apr 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ interface UnifiedChunkFilter extends SafeCloseable {
*/
List<ColumnSource<?>> columnSources();

/**
* Whether this filter is a range filter.
*/
boolean isRangeFilter();

/**
* Whether this filter is a match filter.
*/
boolean isMatchFilter();

/**
* Whether this filter supports direct chunk filtering, i.e., it can be applied to a chunk of data rather than a
* table. This includes any filter that implements {@link ExposesChunkFilter} or {@link ConditionFilter} with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,21 @@ public BasePushdownFilterContextImpl(
"filter must be stateless, but does not permit parallelization: " + filter);
}

this.filter = filter;
this.columnSources = columnSources;

executedFilterCost = 0;
// Extract the effective filter and use it for populating the context.
final WhereFilter effectiveFilter = WhereFilterDelegating.maybeUnwrapFilter(filter);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is pretty significant, allowing wrapped/delegating filters to still be processed efficiently. Unfortunately, this means RowCapturingFilters row tracking is also often getting bypassed so a lot of tests had to be updated to show this.

this.filter = effectiveFilter;

isRangeFilter = filter instanceof RangeFilter
&& ((RangeFilter) filter).getRealFilter() instanceof AbstractRangeFilter;
isMatchFilter = filter instanceof MatchFilter &&
((MatchFilter) filter).getFailoverFilterIfCached() == null;
isRangeFilter = effectiveFilter instanceof RangeFilter
&& ((RangeFilter) effectiveFilter).getRealFilter() instanceof AbstractRangeFilter;
isMatchFilter = effectiveFilter instanceof MatchFilter &&
((MatchFilter) effectiveFilter).getFailoverFilterIfCached() == null;

final Optional<ChunkFilter> chunkFilter = ExposesChunkFilter.chunkFilter(filter);
final Optional<ChunkFilter> chunkFilter = ExposesChunkFilter.chunkFilter(effectiveFilter);
supportsChunkFiltering = chunkFilter.isPresent()
|| (filter instanceof ConditionFilter && ((ConditionFilter) filter).getNumInputsUsed() == 1);
|| (effectiveFilter instanceof ConditionFilter
&& ((ConditionFilter) effectiveFilter).getNumInputsUsed() == 1);

conditionalFilterInitTable = null; // lazily initialized
filterNullBehavior = null; // lazily initialized
Expand Down Expand Up @@ -104,6 +106,16 @@ public final List<ColumnSource<?>> columnSources() {
return columnSources;
}

@Override
public final boolean isRangeFilter() {
return isRangeFilter;
}

@Override
public final boolean isMatchFilter() {
return isMatchFilter;
}

/**
* Whether this filter supports direct chunk filtering, i.e., it can be applied to a chunk of data rather than a
* table. This includes any filter that implements {@link ExposesChunkFilter} or {@link ConditionFilter} with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ public interface MemoizableOperation<T extends DynamicNode & NotificationStepRec
Configuration.getInstance().getBooleanWithDefault("QueryTable.disableWherePushdownParquetDictionary",
false);

/**
* Disable the usage of sorted column regions during push-down filtering.
*/
public static boolean DISABLE_WHERE_PUSHDOWN_SORTED_COLUMN_LOCATION =
Configuration.getInstance().getBooleanWithDefault("QueryTable.disableWherePushdownSortedColumn",
false);

/**
* You can choose to enable or disable the column parallel select and update.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// Copyright (c) 2016-2026 Deephaven Data Labs and Patent Pending
//
package io.deephaven.engine.table.impl.select;

public interface WhereFilterDelegating {

/**
* Returns the filter to which this filter delegates.
*/
WhereFilter getWrappedFilter();

/**
* Returns the wrapped filter if and only if the wrapped filter is functionally identical to this filter. Filters
* that perform a transformation (e.g. {@code not}) on their wrapped filter should return themselves.
*/
WhereFilter maybeUnwrapFilter();

/**
* If the provided filter is an instance of {@code WhereFilterDelegating}, returns the effective wrapped filter of
* that filter. Otherwise, returns the filter itself wrapped in an Optional.
*/
static WhereFilter maybeUnwrapFilter(WhereFilter filter) {
if (filter instanceof WhereFilterDelegating) {
return ((WhereFilterDelegating) filter).maybeUnwrapFilter();
}
// This filter is not a delegating filter, so return it directly.
return filter;
Comment thread
lbooker42 marked this conversation as resolved.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public abstract class WhereFilterDelegatingBase
extends WhereFilterLivenessArtifactImpl
implements DependencyStreamProvider {
implements WhereFilterDelegating, DependencyStreamProvider {

protected final WhereFilter filter;

Expand All @@ -45,6 +45,7 @@ public Stream<NotificationQueue.Dependency> getDependencyStream() {
return Stream.empty();
}

@Override
public WhereFilter getWrappedFilter() {
return filter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ private WhereFilterInvertedImpl(WhereFilter filter) {
super(filter);
}

@Override
public WhereFilter maybeUnwrapFilter() {
// This filter inverts the results of the wrapped filter so we can't unwrap.
return this;
}

@NotNull
@Override
public WritableRowSet filter(
Expand All @@ -47,11 +53,6 @@ public String toString() {
return "not(" + filter + ")";
}

@VisibleForTesting
WhereFilter filter() {
return filter;
}

@Override
public final <T> T walk(Visitor<T> visitor) {
return visitor.visit(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ private WhereFilterSerialImpl(WhereFilter filter) {
super(filter);
}

@Override
public WhereFilter maybeUnwrapFilter() {
if (filter instanceof WhereFilterDelegating) {
// Delegate to the wrapped filter to find the effective wrapped filter.
return ((WhereFilterDelegating) filter).maybeUnwrapFilter();
}
return filter;
}

/**
* Always returns {@code false} to indicate that parallelization is not permitted.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ private WhereFilterWithDeclaredBarriersImpl(
this.declaredBarriers = declaredBarriers;
}

@Override
public WhereFilter maybeUnwrapFilter() {
if (filter instanceof WhereFilterDelegating) {
// Delegate to the wrapped filter to find the effective wrapped filter.
return ((WhereFilterDelegating) filter).maybeUnwrapFilter();
}
return filter;
}

public Object[] declaredBarriers() {
return declaredBarriers;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ private WhereFilterWithRespectedBarriersImpl(
this.respectedBarriers = respectedBarriers;
}

@Override
public WhereFilter maybeUnwrapFilter() {
if (filter instanceof WhereFilterDelegating) {
// Delegate to the wrapped filter to find the effective wrapped filter.
return ((WhereFilterDelegating) filter).maybeUnwrapFilter();
}
return filter;
}

public Object[] respectedBarriers() {
return respectedBarriers;
}
Expand Down
Loading
Loading