Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/23800 )
Change subject: IMPALA-14555: Add Iceberg support for SHOW PARTITIONS WHERE ...................................................................... Patch Set 5: Code-Review+1 (5 comments) Left a few small comments, otherwise LGTM! http://gerrit.cloudera.org:8080/#/c/23800/5//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23800/5//COMMIT_MSG@13 PS5, Line 13: manifest-based metadata filtering nit: "manifest-base file/partition filtering", or "metadata-based file/partition filtering" http://gerrit.cloudera.org:8080/#/c/23800/5//COMMIT_MSG@20 PS5, Line 20: SELECT * FROM : functional.iceberg_partitioned.partitions WHERE upper(action) = 'CLICK';` iceberg_partitioned is in the functional_parquet database. Also, "partitions" is a keyword, which means you need to use backticks to refer the metadata table, i.e.: funcational_parquet.iceberg_partitions.`partitions` But this query still won't work because the `partitions` metadata table has a special schema. http://gerrit.cloudera.org:8080/#/c/23800/5/fe/src/main/java/org/apache/impala/analysis/IcebergPartitionExpressionRewriter.java File fe/src/main/java/org/apache/impala/analysis/IcebergPartitionExpressionRewriter.java: http://gerrit.cloudera.org:8080/#/c/23800/5/fe/src/main/java/org/apache/impala/analysis/IcebergPartitionExpressionRewriter.java@66 PS5, Line 66: if (expr instanceof BetweenPredicate) { This also makes it possible to use BETWEEN in DROP PARTITION statements, right? We should add tests for that as well. http://gerrit.cloudera.org:8080/#/c/23800/5/fe/src/main/java/org/apache/impala/analysis/IcebergPartitionExpressionRewriter.java@65 PS5, Line 65: // Rewrite BETWEEN predicates to compound predicates : if (expr instanceof BetweenPredicate) { : expr = BetweenToCompoundRule.INSTANCE.apply(expr, analyzer_); : if (!expr.isAnalyzed()) { : expr.analyze(analyzer_); : } : } I think it would be cleaner to follow the same pattern you see in this method, i.e.: if (expr instanceof BetweenPredicate) { BetweenPredicate betweenPredicate = (BetweenPredicate) expr; return rewrite(betweenPredicate); } ... private CompoundPredicate rewrite(BetweenPredicate betweenPredicate) { CompoundPredicate compoundPredicate = BetweenToCompoundRule.INSTANCE.apply(betweenPredicate, analyzer_); if (!compoundPredicate.isAnalyzed()) { compoundPredicate.analyze(analyzer_); } return rewrite(compoundPredicate); } http://gerrit.cloudera.org:8080/#/c/23800/5/fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java File fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java: http://gerrit.cloudera.org:8080/#/c/23800/5/fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java@260 PS5, Line 260: * SELECT * FROM functional.iceberg_partitioned.partitions : * WHERE upper(action) = 'CLICK'; This query is invalid, see my other comment. -- To view, visit http://gerrit.cloudera.org:8080/23800 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4c0ee4d171ae939770725d89dc504e13f82a7688 Gerrit-Change-Number: 23800 Gerrit-PatchSet: 5 Gerrit-Owner: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Arnab Karmakar <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Daniel Vanko <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Mihaly Szjatinya <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Mon, 09 Feb 2026 10:38:36 +0000 Gerrit-HasComments: Yes
