You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c7ffbda
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](iceberg) Preserve nullability in schema metadata (#68640)
### What problem does this PR solve?
Related PR: #67856
Problem Summary:
Iceberg columns declared `NOT NULL` are shown as nullable by `DESC`,
`SHOW CREATE TABLE`, `SHOW [FULL] COLUMNS` and
`information_schema.columns`. The connector reads every top-level column
as nullable on purpose, since old data files can miss a column, and the
display paths reuse that read schema.
`ConnectorColumn` now also carries the nullability the source declares.
The Iceberg connector sets it from the field's required flag, and these
metadata commands use it. The columns used for reads and writes stay
nullable.
### Release note
Show the declared nullability of Iceberg columns in `DESC`, `SHOW CREATE
TABLE`, `SHOW COLUMNS` and `information_schema.columns`.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- Behavior changed:
- [x] Yes. Required Iceberg columns are now shown as `NOT NULL`.
- Does this need documentation?
- [x] No.
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadataTest.java
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -888,6 +888,25 @@ public void getTableSchemaCarriesFieldDocAsComment() {
888
888
"a doc-less Iceberg field must yield an empty (not null) comment");
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-spi/src/test/java/org/apache/doris/connector/spi/ConnectorPluginSurfaceTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -88,8 +88,9 @@ public void connectorApiMajorTracksTheRecordedSurfaceChange() throws IOException
88
88
Assertions.assertNotNull(in, "missing connector plugin API version resource");
89
89
version.load(in);
90
90
}
91
-
// Major 18 adds DiagnosticException to the major 17 scoped streaming surface.
0 commit comments