lipeng...@sensorsdata.cn has posted comments on this change. ( http://gerrit.cloudera.org:8080/18574 )
Change subject: IMPALA-11279: Optimize plain count(*) queries for Iceberg tables ...................................................................... Patch Set 14: (4 comments) http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java File fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java: http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@552 PS12, Line 552: > I think that the right place to call this is in SelectAnalyzer.analyze() in Done http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java File fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java: http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java@59 PS12, Line 59: // cache prior shouldConvertToCNF checks to avoid repeat tree walking : // omitted from clone in case > As this is a global value for the whole select block, I think that this sho Done http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java File fe/src/main/java/org/apache/impala/analysis/SelectStmt.java: http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@1347 PS12, Line 1347: table = analyzer_.getCatalog().getTable(tableName.getDb(), tableName.getTbl()); : } catch (DatabaseNotFoundException e) { : throw new AnalysisException( : Analyzer.DB_DOES_NOT_EXIST_ERROR_MSG + tableName.getDb(), e); : } : if (!(table instanceof FeIcebergTable)) return; : : boolean hasCountStarFunc = false; : boolean hasAggFunc = false; : analyzer_.checkStmtExprLimit(); : for (SelectListItem selectItem : this.getSelectList().getItems()) { : Expr expr = selectItem.getExpr(); : > This is not strictly necessary - count(*) can be replaced with a literal ev Done http://gerrit.cloudera.org:8080/#/c/18574/12/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@1365 PS12, Line 1365: } else { > As I wrote in FunctionCallExpr, I think that it would be better to save thi Done -- To view, visit http://gerrit.cloudera.org:8080/18574 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8e9c48bbba7ab2320fa80915e7001ce54f1ef6d9 Gerrit-Change-Number: 18574 Gerrit-PatchSet: 14 Gerrit-Owner: Anonymous Coward <lipeng...@sensorsdata.cn> Gerrit-Reviewer: Anonymous Coward <lipeng...@sensorsdata.cn> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Gergely Fürnstáhl <gfurnst...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Jian Zhang <zjsar...@gmail.com> Gerrit-Reviewer: Tamas Mate <tma...@apache.org> Gerrit-Reviewer: Xianqing He <hexianqing...@126.com> Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com> Gerrit-Comment-Date: Thu, 16 Jun 2022 12:42:17 +0000 Gerrit-HasComments: Yes