Skip to content

branch-4.1: [fix](variant) Prefer sparse variant fields over root value #65660#65950

Merged
yiguolei merged 2 commits into
branch-4.1from
auto-pick-65660-branch-4.1
Jul 24, 2026
Merged

branch-4.1: [fix](variant) Prefer sparse variant fields over root value #65660#65950
yiguolei merged 2 commits into
branch-4.1from
auto-pick-65660-branch-4.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #65660

A distributed ordered query using TopN lazy
materialization could return an array root such as [] instead of the
object fields stored in a VARIANT row. Root visibility already
considered dense subcolumns and document snapshots but ignored sparse
subcolumns, so a non-null root incorrectly won during serialization.
Check the current row sparse offsets before treating the root as
visible. Before the fix the reproduced row returned []; after the fix it
returns {"n":7,"word":"hot"}.
@github-actions
github-actions Bot requested a review from yiguolei as a code owner July 23, 2026 07:11
@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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@eldenmoon

Copy link
Copy Markdown
Member

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 56.51% (22692/40153)
Line Coverage 40.29% (222277/551670)
Region Coverage 36.62% (175502/479292)
Branch Coverage 37.71% (78396/207888)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 72.87% (28585/39226)
Line Coverage 56.33% (309316/549077)
Region Coverage 53.57% (258410/482385)
Branch Coverage 54.57% (113599/208175)

@yiguolei
yiguolei merged commit be8b2c9 into branch-4.1 Jul 24, 2026
29 of 32 checks passed
@eldenmoon
eldenmoon deleted the auto-pick-65660-branch-4.1 branch July 24, 2026 03:00
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