Skip to content

Conversation

@feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Oct 30, 2024

What problem does this PR solve?

This pr use a unified approach to deal with monotonic function in partition prune. When adding a monotonic function in partition prune, we don't need to add visitXXX in OneRangePartitionEvaluator, only need to implement the Monotonic interface.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@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

@feiniaofeiafei
Copy link
Contributor Author

run p0

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei
Copy link
Contributor Author

run buildall

Comment on lines 806 to 811
if (partitionSlotContainsNull.containsKey(funcChild)) {
forNullable = func.withConstantArgs(partitionSlotContainsNull.get(funcChild)
? new Nullable(funcChild) : new NonNullable(funcChild));
} else {
forNullable = func.withConstantArgs(new Nullable(funcChild));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

boolean isNullable = partitionSlotContainsNull.getOrDefault(funcChild, true);
Expression withNullable = func.withConstantArgs(
        isNullable ? new Nullable(funcChild) : new NonNullable(funcChild)
);

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@morrySnow morrySnow requested a review from 924060929 November 27, 2024 12:52
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 27, 2024
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit a4d9aaa into apache:master Nov 28, 2024
25 of 26 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 28, 2024
… in partition prune (#42934)

This pr use a unified approach to deal with monotonic function in
partition prune. When adding a monotonic function in partition prune, we
don't need to add visitXXX in OneRangePartitionEvaluator, only need to
implement the Monotonic interface.
morrySnow pushed a commit that referenced this pull request Dec 19, 2024
…h monotonic function in partition prune #42934 (#44724)

Cherry-picked from #42934

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.0.4-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants