Skip to content

branch-4.1: [fix](be) Pick #63417 and #63969#64117

Open
BiteTheDDDDt wants to merge 3 commits into
apache:branch-4.1from
BiteTheDDDDt:codex/pick-63417-63969-branch-4.1
Open

branch-4.1: [fix](be) Pick #63417 and #63969#64117
BiteTheDDDDt wants to merge 3 commits into
apache:branch-4.1from
BiteTheDDDDt:codex/pick-63417-63969-branch-4.1

Conversation

@BiteTheDDDDt
Copy link
Copy Markdown
Contributor

Summary

Testing

  • build-support/check-format.sh
  • ./run-be-ut.sh --run --filter=RuntimePredicateTest.*
  • ./run-fe-ut.sh --run org.apache.doris.qe.runtime.ThriftPlansBuilderTest,org.apache.doris.qe.OldCoordinatorTest

BiteTheDDDDt and others added 3 commits June 4, 2026 15:42
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: assert_cast may throw doris::Exception when release type checking detects an invalid cast. The function was annotated with PURE even though throwing an exception is an observable side effect and changes control flow. Remove the incorrect PURE annotation so compilers generate normal exception handling for assert_cast failure paths.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - git diff --cached --check
- Behavior changed: No
- Does this need documentation: No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit ba7c6eb)
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: TopN runtime filters record their source node ids on the target scan node thrift, but the coordinator only marked OlapScan-related source SortNodes as runtime-predicate sources before serializing the plan. For non-Olap scans such as external file scans, the source SortNode could keep a non-runtime-predicate sort algorithm for larger limits, so BE received the ids but filtered them out because the runtime predicate source was never detected. This change marks every scan node's TopN filter source SortNode consistently in both coordinator thrift paths.

### Release note

Fix TopN runtime filter activation for non-Olap scan targets.

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.qe.runtime.ThriftPlansBuilderTest,org.apache.doris.qe.CoordinatorTest#testTopnFilterDescsSharedAmongInstances
    - ./build.sh --fe
- Behavior changed: Yes. TopN runtime filters on non-Olap scan targets now activate consistently with their serialized source node ids.
- Does this need documentation: No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit d99156a)
Issue Number: N/A

Related PR: apache#59088

Problem Summary: apache#59088 changed TopN runtime predicate target initialization to rely on a storage column id. For targets that cannot create a storage column predicate, such as non-pushdown TopN predicates or unsupported storage columns, init_target returned before marking the target as detected. That left RuntimePredicate disabled, so the scan side ignored the TopN source even though FE had sent the source id. This change keeps the target detected when no storage predicate is created, removes obsolete compatibility skips for missing runtime predicate descs, and adds FE/BE coverage for the source marking and no-column target paths.

None

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.qe.runtime.ThriftPlansBuilderTest,org.apache.doris.qe.CoordinatorTest
    - ./run-be-ut.sh --run --filter=RuntimePredicateTest.*
    - cd fe && mvn checkstyle:check -pl fe-core -q
    - build-support/check-format.sh
- Behavior changed: No
- Does this need documentation: No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 38a8f54)
Copilot AI review requested due to automatic review settings June 4, 2026 09:54
@BiteTheDDDDt BiteTheDDDDt requested a review from yiguolei as a code owner June 4, 2026 09:54
@hello-stephen
Copy link
Copy Markdown
Contributor

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BiteTheDDDDt
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (2/2) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants