Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/21825 )
Change subject: IMPALA-889: Add trim() function matching ANSI SQL definition ...................................................................... Patch Set 12: (6 comments) http://gerrit.cloudera.org:8080/#/c/21825/10//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21825/10//COMMIT_MSG@51 PS10, Line 51: 2. Syntax wrapper. TrimFromExpr class was introduced as a syntax wrapper > I think this is still pretty important design choice, so I left some part o thx, looks good! http://gerrit.cloudera.org:8080/#/c/21825/12//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21825/12//COMMIT_MSG@56 PS12, Line 56: 3. No TRIM keyword. Following EXTRACT-FROM, no "TRIM" keyword was added to nit: wrap at 72 chars http://gerrit.cloudera.org:8080/#/c/21825/12/fe/src/main/cup/sql-parser.cup File fe/src/main/cup/sql-parser.cup: http://gerrit.cloudera.org:8080/#/c/21825/12/fe/src/main/cup/sql-parser.cup@3864 PS12, Line 3864: nit: extra space http://gerrit.cloudera.org:8080/#/c/21825/12/fe/src/main/cup/sql-parser.cup@3871 PS12, Line 3871: // For special case: "select trim(table_column from 'string') from table" Can you add that table.column and other forms are handled by another clause? http://gerrit.cloudera.org:8080/#/c/21825/10/fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java File fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java: http://gerrit.cloudera.org:8080/#/c/21825/10/fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java@159 PS10, Line 159: rMsg.append("Expression '" + charset_.toSql() + "' ha > Done The type checking looks good now, but it still doesn't seem ok that super.analyzeImpl(analyzer); is called before changing the param list. It is not a problem for analyzed if one of its argument expressions is already analyzed. http://gerrit.cloudera.org:8080/#/c/21825/12/fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java File fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java: http://gerrit.cloudera.org:8080/#/c/21825/12/fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java@148 PS12, Line 148: super.getParams().size() == 1 Shouldn't this be always the same in the slotRef_ != null branch? -- To view, visit http://gerrit.cloudera.org:8080/21825 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3c4fa6d0d8d0684c4b6d8dac8fd531d205e4f7b4 Gerrit-Change-Number: 21825 Gerrit-PatchSet: 12 Gerrit-Owner: Mihaly Szjatinya <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Daniel Becker <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Mihaly Szjatinya <[email protected]> Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Comment-Date: Tue, 29 Oct 2024 13:01:33 +0000 Gerrit-HasComments: Yes
