Uh oh!
There was an error while loading. Please reload this page.
branch-4.1:[feature](iceberg) Enforce NULL defaults for VARIANT - #67323
Conversation
hello-stephen
commented
Aug 31, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
hubgeter
commented
Sep 1, 2026
run buildall |
hubgeter
commented
Sep 1, 2026
/review |
There was a problem hiding this comment.
Review status: complete. Approval opinion: looks good from a code-review perspective; no blocking issue was found on head d2b6763.
Critical checkpoints:
- Iceberg defaults: optional VARIANT initial and write defaults remain typed SQL NULL, while non-NULL defaults are rejected in FE and defensively in BE. Explicit Variant values, including a Variant payload representing JSON null, remain distinct from SQL NULL.
- Schema and type identity: the FE to TField carrier remains recursive, and the BE correctly preserves the compute-V2 VARIANT representation across the legacy TColumnType boundary for root and nested fields.
- Reader materialization: missing historical fields, required-field failures, nested struct defaults, schema-history lookups, and equality-delete consumers follow the same table-layer default contract. Historical ORC rows remain supported without enabling physical ORC Variant.
- Architecture and lifecycle: the change stays within schema/default and TableReader responsibilities, adds no reverse format-layer dependency, and does not alter split, EOF, cleanup, caching, or profile behavior.
- Performance and observability: the added checks run during schema/default setup, not in per-row or batch hot paths; no counter or attribution path is removed.
- Coverage: focused FE and BE tests cover top-level and nested null/default behavior and malformed metadata. The external regression covers historical Parquet and ORC rows, INSERT, UPDATE, MERGE, DEFAULT, SQL NULL versus Variant JSON null, invalid DDL atomicity, and Spark interoperability. No local builds or tests were run, per the review-runner instruction.
User focus: no additional focus points were provided.
Convergence: the normal FE/integration review, normal BE/materialization review, and separate risk-focused review all returned NO_NEW_VALUABLE_FINDINGS in Round 1. The final changed-file, unresolved-candidate, live-head, and live-inline-thread sweep was clean. No inline comments are needed.
Gabriel39
commented
Sep 2, 2026
run buildall |
d2b6763 to
6f66b58Comparehubgeter
commented
Sep 2, 2026
run buildall |
6f66b58 to
268fcc3Comparehubgeter
commented
Sep 3, 2026
run buildall |
hello-stephen
commented
Sep 3, 2026
FE UT Coverage ReportIncrement line coverage |
Gabriel39
commented
Sep 3, 2026
run buildall |
Gabriel39
left a comment
There was a problem hiding this comment.
The VARIANT default handling now follows the Iceberg V3 requirement that initial-default and write-default must be NULL. The change also correctly preserves the compute-V2 VARIANT representation across the legacy TColumnType schema carrier, including nested fields. The FE, BE, and external regression coverage is comprehensive. The current compile and BE UT failures appear unrelated to this change.
268fcc3 to
826529bCompareyiguolei
commented
Sep 6, 2026
run buildall |
hello-stephen
commented
Sep 6, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Uh oh!
There was an error while loading. Please reload this page.
What problem does this PR solve?
Related PR: #66538
Problem Summary:
Iceberg V3 requires both
initial-defaultandwrite-defaultof a VARIANT field to be NULL. After adding general Iceberg V3 default-value support, Doris still needs explicit VARIANT handling to avoid accepting unsupported non-NULL defaults or reconstructing a compute-V2 VARIANT as the legacy type.This PR:
initial-defaultandwrite-defaultvalues in FE.DEFAULT, SQL NULL versus JSON null, invalid DDL, and Spark interoperability.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)