Skip to content

branch-4.0: [fix](be) Pick #63969 and #63136#64116

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

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

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,org.apache.doris.qe.ResultReceiverConsumerTest

BiteTheDDDDt and others added 3 commits June 4, 2026 15:46
### 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)
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Arrow Flight SQL queries that return results from BE do not create local result receivers. The old coordinator still initialized ResultReceiverConsumer with an empty receiver list, which failed with ArrayBlockingQueue(0), and the new coordinator still created unnecessary local receivers for remote result mode.

### Release note

Fix Arrow Flight SQL query execution when results are returned from BE.

### Check List (For Author)

- Test: Unit Test
    - Ran org.apache.doris.qe.ResultReceiverConsumerTest
    - Ran FE checkstyle for fe-core
- Behavior changed: No
- Does this need documentation: No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 177eaac)
@BiteTheDDDDt BiteTheDDDDt requested a review from morningman as a code owner June 4, 2026 09:54
Copilot AI review requested due to automatic review settings 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

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.29% (19434/36469)
Line Coverage 36.41% (181485/498495)
Region Coverage 32.98% (140872/427137)
Branch Coverage 33.88% (61019/180080)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.49% (25525/35702)
Line Coverage 54.32% (270313/497612)
Region Coverage 51.92% (223995/431463)
Branch Coverage 53.34% (96397/180713)

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