Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24274 )

Change subject: IMPALA-14798: Fix IllegalStateException on COMPUTE STATS on 
Iceberg tables
......................................................................


Patch Set 3:

(2 comments)

Hi Surya, just realized this patch has been blocked for a while. Do you still 
have time to update this patch? We can also update it.

http://gerrit.cloudera.org:8080/#/c/24274/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

http://gerrit.cloudera.org:8080/#/c/24274/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@2135
PS3, Line 2135: if (msTbl.getParameters().containsKey(CATALOG_SERVICE_ID)) {
              :       props.put(CATALOG_SERVICE_ID, 
msTbl.getParameters().get(CATALOG_SERVICE_ID));
              :     }
              :     if (msTbl.getParameters().containsKey(CATALOG_VERSION)) {
              :       props.put(CATALOG_VERSION, 
msTbl.getParameters().get(CATALOG_VERSION));
              :     }
> What is missing now is the Preconditions check iff isEventProcessingEnabled
Agree with Noemi that we should keep the Preconditions check when event 
processing is enabled. msTbl is a modified deep copy which should have these 
properties added in CatalogOpExecutor.alterTable() -> 
modification.addCatalogServiceIdentifiersToTable():
https://github.com/apache/impala/blob/8e7626ce231edca0807e7cf423923bed484fe4d4/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java#L1250

When event processing is disabled, don't need to update these properties. 
Iceberg library will keep them as-is. So I think this is enough:

    Map<String, String> props = new HashMap<>();
    if (catalog_.isEventProcessingEnabled()) {
      
Preconditions.checkState(msTbl.getParameters().containsKey(CATALOG_SERVICE_ID),
          "Missing %s in msTbl", CATALOG_SERVICE_ID);
      
Preconditions.checkState(msTbl.getParameters().containsKey(CATALOG_VERSION),
          "Missing %s in msTbl", CATALOG_VERSION);
      props.put(CATALOG_SERVICE_ID, 
msTbl.getParameters().get(CATALOG_SERVICE_ID));
      props.put(CATALOG_VERSION, msTbl.getParameters().get(CATALOG_VERSION));
    }

Note that the above code adds the error messages when the check fails. So we 
won't see a simple "IllegalStateException: null" message.


http://gerrit.cloudera.org:8080/#/c/24274/3/tests/custom_cluster/test_metadata_no_events_processing.py
File tests/custom_cluster/test_metadata_no_events_processing.py:

http://gerrit.cloudera.org:8080/#/c/24274/3/tests/custom_cluster/test_metadata_no_events_processing.py@342
PS3, Line 342: self.run_stmt_in_hive("create table %s (id int) stored by 
iceberg;" % tbl)
> That's exactly what we want to see, that CATALOG_SERVICE_ID is missing. Jus
I think we can use DESCRIBE FORMATTED to verify these properties. There is an 
example in tests/custom_cluster/test_kudu.py test_implicit_external_table_props
https://github.com/apache/impala/blob/8e7626ce231edca0807e7cf423923bed484fe4d4/tests/custom_cluster/test_kudu.py#L193-L204



--
To view, visit http://gerrit.cloudera.org:8080/24274
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I71c36872bf84c44af8283bab11ce97e60a3e598c
Gerrit-Change-Number: 24274
Gerrit-PatchSet: 3
Gerrit-Owner: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Tue, 13 Oct 2026 03:37:55 +0000
Gerrit-HasComments: Yes

Reply via email to