Zoltan Borok-Nagy has posted comments on this change. ( https://gerrit.cloudera.org/25189 )
Change subject: IMPALA-15616: Treat DEFAULT NULL on nullable Iceberg columns as no default ...................................................................... Patch Set 1: Code-Review+1 (3 comments) Thanks for working on this! https://gerrit.cloudera.org/#/c/25189/1/fe/src/main/java/org/apache/impala/analysis/AlterTableAlterColStmt.java File fe/src/main/java/org/apache/impala/analysis/AlterTableAlterColStmt.java: https://gerrit.cloudera.org/#/c/25189/1/fe/src/main/java/org/apache/impala/analysis/AlterTableAlterColStmt.java@108 PS1, Line 108: if (isDropDefault_ || newColDef_.isIcebergSqlNullDefault()) { On a required column, SET DEFAULT NULL now silently drops the write-default, and the next INSERT that leaves out the column fails at write time. CREATE/ADD reject NOT NULL DEFAULT NULL ("Default value of NULL not allowed on non-nullable column"). Could we raise the same error here when !column.isNullable() && !isDropDefault_? https://gerrit.cloudera.org/#/c/25189/1/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java File fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java: https://gerrit.cloudera.org/#/c/25189/1/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java@612 PS1, Line 612: AnalyzesOk(tbl + "alter column id set default null"); iceberg_non_partitioned is format-version 1, so this locks in the V1 behaviour above. Please use a V3 table here, and add an AnalysisError for V1 plus one for a required column. If there are no such tables then e2e tests are fine. https://gerrit.cloudera.org/#/c/25189/1/testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-default-values.test File testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-default-values.test: https://gerrit.cloudera.org/#/c/25189/1/testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-default-values.test@585 PS1, Line 585: # Non-STRING types: DEFAULT NULL must not be sent as the text 'NULL' to catalogd. The Jira's catalogd failures for non-STRING types were ADD COLUMN b BOOLEAN DEFAULT NULL and ALTER COLUMN i SET DEFAULT CAST(NULL AS INT). Only CREATE TABLE is covered end to end here. Could you add those two statements? -- To view, visit https://gerrit.cloudera.org/25189 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3d8909ca0004c1eb7fcf3cc1dc9952679ce70eda Gerrit-Change-Number: 25189 Gerrit-PatchSet: 1 Gerrit-Owner: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Fri, 06 Nov 2026 16:31:02 +0000 Gerrit-HasComments: Yes
