Skip to content

branch-4.1: [feature](variant) Support ColumnVariantV2 segment reads and writes - #66607

Open
eldenmoon wants to merge 2 commits into
apache:branch-4.1from
eldenmoon:branch-pick-pr-66204-to-branch-4.1
Open

branch-4.1: [feature](variant) Support ColumnVariantV2 segment reads and writes#66607
eldenmoon wants to merge 2 commits into
apache:branch-4.1from
eldenmoon:branch-pick-pr-66204-to-branch-4.1

Conversation

@eldenmoon

Copy link
Copy Markdown
Member

cherry-pick #66204

@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?

@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
eldenmoon marked this pull request as ready for review August 10, 2026 07:49
@eldenmoon
eldenmoon requested a review from yiguolei as a code owner August 10, 2026 07:49
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 82.47% (3994/4843) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.92% (30781/41640)
Line Coverage 57.98% (340191/586744)
Region Coverage 54.86% (283379/516545)
Branch Coverage 55.81% (127580/228579)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 55.56% (25/45) 🎉
Increment coverage report
Complete coverage report

@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 81.47% (3987/4894) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 58.72% (25089/42726)
Line Coverage 43.15% (255068/591175)
Region Coverage 39.19% (201895/515232)
Branch Coverage 40.69% (93111/228847)

@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon

Copy link
Copy Markdown
Member Author

run beut

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 81.47% (3987/4894) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 58.73% (25093/42726)
Line Coverage 43.18% (255251/591175)
Region Coverage 39.21% (202042/515232)
Branch Coverage 40.70% (93144/228847)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 82.47% (3994/4843) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.88% (30763/41640)
Line Coverage 57.97% (340115/586744)
Region Coverage 54.82% (283157/516545)
Branch Coverage 55.79% (127533/228579)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 69.23% (36/52) 🎉
Increment coverage report
Complete coverage report

### What problem does this PR solve?

Issue Number: None

Related PR: apache#66204

Problem Summary: Backport PR apache#66204 to branch-4.1 while preserving Variant V1 behavior when Config.enable_variant_v2 is disabled. Native Doris VARIANT now follows the FE config exclusively, Paimon uses the same global policy, the removed session variable no longer participates in V1/V2 routing, and computeV2 remains only as the physical-format marker required by external Iceberg and Paimon paths. Paimon scalar regression expectations are aligned with the existing Doris SQL serialization contract.

### Release note

Support ColumnVariantV2 segment reads and writes on branch-4.1. Native Doris and Paimon V1/V2 routing follows Config.enable_variant_v2.

### Check List (For Author)

- Test: Regression test / Unit Test
    - BE Variant unit tests: 714 total, 709 passed and 5 preset skips
    - PaimonVariantWriteAnalyzerTest: 9 passed
    - PaimonScanNodeTest and VariableMgrTest: 52 passed
    - DataTypeVariantV2SerdeOutputTest: 7 passed
    - variant_p0 with Config=false and Config=true: 163 passed in each mode; one OSS credential-dependent case was excluded due InvalidAccessKeyId
    - build-support/clang-format.sh
- Behavior changed: Yes. Variant V2 reads and writes are enabled when configured; legacy V1 behavior remains unchanged when disabled; enable_variant_v2 is no longer a session variable.
- Does this need documentation: No
@eldenmoon
eldenmoon force-pushed the branch-pick-pr-66204-to-branch-4.1 branch from be6ea02 to f5286b9 Compare August 11, 2026 02:13
@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

1 similar comment
@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

### What problem does this PR solve?

Issue Number: None

Related PR: apache#66204

Problem Summary: The mixed-row-group Parquet test rendered extracted Variant V2 values through the SQL to_string path. Top-level SQL strings intentionally follow the legacy V1 display contract and omit JSON quotes, so the test no longer verified its expected JSON representation after the backport. Serialize the extracted values through the explicit JSON API so the assertion remains type-sensitive without changing SQL behavior.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - NewParquetReaderTest.SwitchesVariantLeafProjectionPerRowGroup
    - DataTypeVariantV2SerdeOutputTest.*
- Behavior changed: No
- Does this need documentation: No
@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 59.62% (31/52) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 23.48% (27/115) 🎉
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.

2 participants