BiteTheDDDDt opened a new pull request, #65857:
URL: https://github.com/apache/doris/pull/65857
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
Runtime filter partition pruning may project a join target expression over
partition boundary values before normal row predicates are evaluated. For a
target such as `assert_true`, this speculative evaluation can raise an error
for a partition value even though every row with that value would be filtered
out before the join evaluates the target. As a result, enabling runtime filter
partition pruning changes a successful query into an error.
This change preserves query semantics in two layers:
- FE rejects target expressions containing `NoneMovableFunction` from
runtime filter partition pruning.
- BE treats `INVALID_ARGUMENT` from speculative boundary projection as an
unsupported pruning case and conservatively disables that optional pruning,
which also protects mixed-version clusters with an older FE.
Other projection errors and FE/BE metadata mismatches are still propagated.
### Release note
Fix runtime filter partition pruning to preserve query behavior for
error-producing target expressions.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
Tested with:
- `RuntimeFilterPartitionPruneClassifierTest`
-
`RuntimeFilterPartitionPrunerTest.InvalidArgumentDuringProjectionDisablesPruning`
- `query_p0/runtime_filter/rf_partition_pruning`
- `./build.sh --fe`
- `./build.sh --be`
- Manual comparison on FE port 9333: both
`enable_runtime_filter_partition_prune=false` and `true` return `1`
- Behavior changed:
- [ ] No.
- [x] Yes. Unsafe target expressions no longer participate in runtime
filter partition pruning; query results and errors remain consistent with
ordinary execution.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]