Nandor Kollar has posted comments on this change. ( http://gerrit.cloudera.org:8080/24633 )
Change subject: IMPALA-15222: Short-circuit OPTIMIZE when the table is compact ...................................................................... Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/24633/1/fe/src/main/java/org/apache/impala/analysis/OptimizeStmt.java File fe/src/main/java/org/apache/impala/analysis/OptimizeStmt.java: http://gerrit.cloudera.org:8080/#/c/24633/1/fe/src/main/java/org/apache/impala/analysis/OptimizeStmt.java@180 PS1, Line 180: if (mode_ == TIcebergOptimizationMode.NO_OP) { I'm afraid that due to the early return here, there's a slim chance that reset (if it is called at all) will fail with an NPE, as both sortColumns_ and sourceStmt_ remain uninitialized. It seems that reAnalyze calls reset on the statement. Is there any chance that an Optimize statement gets reanalyzed? The fix should be simple: I think we should guard each state variable change in reset with a null check. -- To view, visit http://gerrit.cloudera.org:8080/24633 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I795967ca18231ef1fefdbc71a9b4505905906f95 Gerrit-Change-Number: 24633 Gerrit-PatchSet: 1 Gerrit-Owner: Noemi Pap-Takacs <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[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: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Thu, 13 Aug 2026 13:49:48 +0000 Gerrit-HasComments: Yes
