Skip to content
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

[Fix](nereids) fix partition prune not expression compute logic #40619

Merged

Conversation

feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Sep 10, 2024

In partition pruning, whether an expression supports NOT computation depends on the rejectNot boolean flag. If rejectNot is true, it indicates support for the computation. For example, consider partition column a with a range of (1,10) in partition1. For the expression NOT (a > 5), the computation process involves first evaluating a > 5. Combined with the partition range, this results in 5 < a < 10 for a > 5. Then, applying NOT (a > 5) leads to the range 1 < a <= 5 if rejectNot is true, meaning the calculation is valid.

However, this calculation should only be supported for certain operators like <, <=, >, >= and =. In this pull request (PR), the default value of rejectNot is set to false, reducing the range of expressions that support NOT computation. This change prevents unsupported expressions, such as LIKE, from producing incorrect results.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@morrySnow morrySnow merged commit 37e5e99 into apache:branch-2.0 Sep 11, 2024
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants