hubgeter opened a new pull request, #67856:
URL: https://github.com/apache/doris/pull/67856
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
Iceberg columns declared `NOT NULL` are reported as nullable by `DESC` and
`SHOW CREATE TABLE`. For example, `id BIGINT NOT NULL` appears as `Null: Yes`
and `bigint NULL`, even though inserting NULL is rejected.
Build independent display columns from one retained Iceberg metadata
generation and preserve their top-level required/optional flags. Both display
commands use these columns; scan columns retain their existing nullable
semantics for historical files and schema evolution. Existing nested-type and
write-validation behavior is preserved.
### Release note
Fix `DESC` and `SHOW CREATE TABLE` to display `NOT NULL` for required
top-level Iceberg columns.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
Validation:
- 95 focused FE unit tests passed, including 6 new
`IcebergSchemaDisplayTest` cases.
- `test_iceberg_show_nullable` passed against HMS, covering empty/populated
tables, NULL write rejection, and schema-only nullable changes followed by
refresh without a new data snapshot.
- FE build, changed-file Checkstyle, and whitespace checks passed.
The build and tests ran on the implementation base `14d3d957c02f`; the six
patch files are unchanged after rebasing onto the latest `branch-4.1`. The HMS
run used an existing `4.1.3-rc02` BE binary; C++ BE was not rebuilt.
- Behavior changed:
- [ ] No.
- [x] Yes. Required top-level Iceberg columns now display `No` / `NOT
NULL`.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]