Gabriel39 opened a new pull request, #65471:
URL: https://github.com/apache/doris/pull/65471
### What problem does this PR solve?
Issue Number: None
Related PR: #65449
Problem Summary:
FileScannerV2 split-level partition pruning classified predicates only by
their referenced slots. A predicate could therefore reference only partition
columns while also containing a zero-slot non-deterministic or error-preserving
expression. Evaluating such a predicate once before reading the split could
change its normal row-level semantics and incorrectly prune the whole file.
This change checks the unwrapped predicate's existing safe-to-reorder
contract before evaluating it at split level. Unsafe predicates stay on the
normal row-level path. A focused unit test verifies that an unsafe
runtime-filter predicate is neither executed nor used to prune a split.
### Release note
Prevent FileScannerV2 partition pruning from pre-evaluating
non-deterministic or error-preserving predicates.
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test
- `TableReaderTest.PrepareSplit*` (2 tests passed on the remote
ASAN_UT build)
- `build-support/clang-format.sh`
- `build-support/check-format.sh`
- `git diff --check`
- clang-tidy was attempted with the generated compilation database;
analysis was blocked by the remote toolchain's missing `stddef.h` and
pre-existing diagnostics outside the changed lines.
- [ ] Manual test
- [ ] No need to test or manual test.
- Behavior changed:
- [ ] No.
- [x] Yes. Unsafe predicates remain on the normal row-level evaluation
path instead of being evaluated once per split.
- 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]