Daniel Vanko has posted comments on this change. ( 
https://gerrit.cloudera.org/25387 )

Change subject: IMPALA-15504: ALTER TABLE SET/UNSET TBLPROPERTIES on REST 
catalog tables
......................................................................


Patch Set 5:

(7 comments)

Thanks for working on it! The change has quite a few unrelated changes, which 
on their own are valid, but they're inlfating the diff and the blame history. 
However, I'm fine if you decide that they stay in the patch.

https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableAddColsStmt.java
File fe/src/main/java/org/apache/impala/analysis/AlterTableAddColsStmt.java:

https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableAddColsStmt.java@58
PS5, Line 58:     Preconditions.checkState(columnDefs != null && 
!columnDefs.isEmpty());
nit: unrelated change


https://gerrit.cloudera.org/#/c/25387/5/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/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableAlterColStmt.java@165
PS5, Line 165:     if (!colName_.equalsIgnoreCase(newColDef_.getColName()) &&
nit: unrelated changes


https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableDropColStmt.java
File fe/src/main/java/org/apache/impala/analysis/AlterTableDropColStmt.java:

https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableDropColStmt.java@71
PS5, Line 71:       if (fs.getName().equalsIgnoreCase(colName_)) {
nit: unrelated change


https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableUnSetTblProperties.java
File 
fe/src/main/java/org/apache/impala/analysis/AlterTableUnSetTblProperties.java:

https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/analysis/AlterTableUnSetTblProperties.java@100
PS5, Line 100:       analyzeKuduTable();
nit: unrelated changes


https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java
File fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java:

https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java@157
PS5, Line 157: Iceberg rejects the commit if the table
             :    * changes concurrently.
I (and Opus) think Iceberg doesn't necessarily reject the commit on a 
concurrent change. It reloads the table and re-applies the property updates, 
and it retries on CommitFailedException ( 
https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/core/src/main/java/org/apache/iceberg/BaseTransaction.java#L351-L387
 ). This is just regarding the comment.


https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java@170
PS5, Line 170:     if (!(table instanceof FeIcebergTable iceTbl)
             :         || !catalogName.equals(iceTbl.getCatalogName())) {
             :       throw new ImpalaRuntimeException(String.format(
             :           "Table %s.%s is no longer an Iceberg table of REST 
catalog %s. Retry.",
             :           dbName, tblName, catalogName));
IMO this could hide the real reason of unsuccessful reload, when getTable() 
returns a FeIncompleteTable. How about something like this:

if (table instanceof FeIncompleteTable incomplete) {
  // The table failed to load since analysis.
  throw new TableLoadingException(String.format(
      "Failed to load metadata for table: %s.%s in catalog %s", dbName, 
tblName, catalogName),
      incomplete.getCause());
}
Preconditions.checkState(table instanceof FeIcebergTable, ...);
FeIcebergTable iceTbl = (FeIcebergTable) table;


https://gerrit.cloudera.org/#/c/25387/5/fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java@184
PS5, Line 184:     } catch (IllegalArgumentException | ValidationException | 
CommitFailedException e) {
I'd consider catching the following exceptions, too:
- NoSuchTableException, mapping it to TableNotFoundException
- IllegalStateException, caused by UUID mismatch, when the table was dropped 
and recreated, mapping it to "table was replaced, retry" error or something 
similar
- CommitStateUnknownException, mapping it to an error saying we don't know it 
the ALTER was successful or not



--
To view, visit https://gerrit.cloudera.org/25387
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec64de016a288bf8055072328551a79951ff97e1
Gerrit-Change-Number: 25387
Gerrit-PatchSet: 5
Gerrit-Owner: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Daniel Vanko <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 18 Nov 2026 12:47:55 +0000
Gerrit-HasComments: Yes

Reply via email to