-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable predicate batch_iceberg_predicate_pushdown #20058
base: main
Are you sure you want to change the base?
disable predicate batch_iceberg_predicate_pushdown #20058
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fn apply(&self, plan: PlanRef) -> Option<PlanRef> { | ||
let filter: &BatchFilter = plan.as_batch_filter()?; | ||
let input = filter.input(); | ||
let scan: &BatchIcebergScan = input.as_batch_iceberg_scan()?; | ||
// NOTE(kwannoel): We only fill iceberg predicate here. | ||
assert_eq!(scan.predicate, IcebergPredicate::AlwaysTrue); | ||
|
||
let predicate = filter.predicate().clone(); | ||
let (iceberg_predicate, rw_predicate) = | ||
rw_predicate_to_iceberg_predicate(predicate, scan.schema().fields()); | ||
let scan = scan.clone_with_predicate(iceberg_predicate); | ||
if rw_predicate.always_true() { | ||
Some(scan.into()) | ||
} else { | ||
let filter = filter | ||
.clone_with_input(scan.into()) | ||
.clone_with_predicate(rw_predicate); | ||
Some(filter.into()) | ||
} | ||
Some(plan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original code had an assertion that scan.predicate
must be AlwaysTrue
. By changing this function to simply return Some(plan)
, that assertion could be violated. Consider either removing the assertion if it's no longer needed, or adding validation to ensure scan.predicate
remains AlwaysTrue
when bypassing the transformation logic.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
ebf92f1
to
c85f07e
Compare
08f770b
to
7b260c9
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
Documentation
Release note