Skip to content

branch-4.1: [fix](fe) Fix view columns losing colUniqueId in lazy materialization #62533#62573

Open
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-62533-branch-4.1
Open

branch-4.1: [fix](fe) Fix view columns losing colUniqueId in lazy materialization #62533#62573
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-62533-branch-4.1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Cherry-picked from #62533

…#62533)

### What problem does this PR solve?

When querying columns through a view with TopN + lazy materialization,
SlotReference.withOneLevelTableAndColumnAndQualifier() incorrectly
replaced
originalColumn with the view's Column object (which has uniqueId=-1).
This caused colUniqueId=-1 in the physical plan, making BE unable to
find
the column during the two-phase read (lazy materialize) fetch, resulting
in
"returned block with row count 0 not match request row id count" error.
    
The fix preserves the original base table Column (which carries the
correct
    uniqueId) instead of overwriting it with the view's Column.
@github-actions github-actions bot requested a review from yiguolei as a code owner April 17, 2026 03:46
@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?

@dataroaring dataroaring reopened this Apr 17, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (1/1) 🎉
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