Hello Peter Rozsa, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    https://gerrit.cloudera.org/25454

to look at the new patch set (#5).

Change subject: IMPALA-15793: Reject dropping a partition source column of 
Iceberg tables
......................................................................

IMPALA-15793: Reject dropping a partition source column of Iceberg tables

After the partition spec of an Iceberg table changed and the source
column of a partition field of an old spec was dropped, DELETE, UPDATE
and MERGE on rows in data files of the old spec didn't take effect in
release builds: the statements reported success, but the deleted rows
stayed in the table. In debug builds impalad crashed on a DCHECK in the
delete sink.

Iceberg types a partition field whose source column was dropped as
unknown and writes its value as null in new manifests, so the
partition-scoped position deletes that later DML writes for the data
files of that spec don't match them.

Like Trino, ALTER TABLE DROP COLUMN on an Iceberg table now fails if the
column, or a field nested in it, is the source of a partition field of
any partition spec of the table, the current one or an older one.
Tables whose partition source columns were already dropped, e.g. by
older Impala versions or by other engines, can still be loaded, as
IMPALA-13591 describes their partition fields as VOID, but DML on the
data files of their old specs is still affected.

Testing:
 - Added AlterTableDropColStmtTest for partition fields of the current
   and of older specs, nested source columns, case-insensitive column
   names and unpartitioned tables.
 - Replaced the IMPALA-13591 EE tests in iceberg-alter-v2.test, which
   dropped such a column, with tests that dropping a source column of
   the current or of an older partition spec fails, also when the
   column is partitioned again, and that dropping other columns still
   works. Removed test_iceberg_drop_old_partition_col, which needs such
   a column to be dropped.

Change-Id: I03ae34cb19197e9d711fc462c4bcf6f050291648
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M be/src/exec/file-metadata-utils.cc
M fe/src/main/java/org/apache/impala/analysis/AlterTableDropColStmt.java
M fe/src/main/java/org/apache/impala/util/IcebergUtil.java
A fe/src/test/java/org/apache/impala/analysis/AlterTableDropColStmtTest.java
M testdata/workloads/functional-query/queries/QueryTest/iceberg-alter-v1.test
M testdata/workloads/functional-query/queries/QueryTest/iceberg-alter-v2.test
A 
testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-drop-partition-source.test
M tests/query_test/test_iceberg.py
8 files changed, 380 insertions(+), 83 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/54/25454/5
--
To view, visit https://gerrit.cloudera.org/25454
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I03ae34cb19197e9d711fc462c4bcf6f050291648
Gerrit-Change-Number: 25454
Gerrit-PatchSet: 5
Gerrit-Owner: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>

Reply via email to