Arnab Karmakar has posted comments on this change. ( http://gerrit.cloudera.org:8080/25183 )
Change subject: IMPALA-15615: Create required fields for NOT NULL columns in Iceberg ADD COLUMN ...................................................................... Patch Set 2: (2 comments) Thanks for the comments! http://gerrit.cloudera.org:8080/#/c/25183/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/25183/1//COMMIT_MSG@9 PS1, Line 9: On Iceberg V3 tables, ALTER TABLE ... ADD COLUMN(S) with NOT NULL and : DEFAULT added the column as optional even though CREATE TABLE with the : same definition produced a required field. DESCRIBE showed the column as : nullable and INSERT could store NULL. : : addColumns() always used UpdateSchema.addColumn() and ignored : TColumn.is_nullable. When is_nullable is false, it now calls : addRequiredColumn() instead. Analysis already requires a DEFAULT for : NOT NULL adds on V3, so Iceberg accepts the change without : allowIncompatibleChanges(). : : Testing: : - e2e coverage in iceberg-v3-default-values.test for ADD COLUMN and : ADD COLUMNS with NOT NULL DEFAULT: nullability in DESCRIBE, defaults : on read and write, and rejection of explicit NULL on INSERT. : : Change-Id: Idd7e882b1fd86f60fede0964dbcad1a55bea3691 : Assisted-by: Claude Sonnet 5.5 (Cursor) : : : : : : : : > nit: could it be less verbose? Done http://gerrit.cloudera.org:8080/#/c/25183/1/fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java File fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java: http://gerrit.cloudera.org:8080/#/c/25183/1/fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java@179 PS1, Line 179: IcebergSchemaConverter.parseStringToIcebergLiteral(defaultStr, type); : } catch (Exception e) { : throw new ImpalaRuntimeException(String.format( : "Failed to parse default value '%s' for column '%s': %s", : > For readability, this could be moved to a helper method: Done -- To view, visit http://gerrit.cloudera.org:8080/25183 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idd7e882b1fd86f60fede0964dbcad1a55bea3691 Gerrit-Change-Number: 25183 Gerrit-PatchSet: 2 Gerrit-Owner: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Thu, 22 Oct 2026 11:57:16 +0000 Gerrit-HasComments: Yes
