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 8:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21825/8/fe/src/main/cup/sql-parser.cup
File fe/src/main/cup/sql-parser.cup:

http://gerrit.cloudera.org:8080/#/c/21825/8/fe/src/main/cup/sql-parser.cup@3885
PS8, Line 3885: string_expr
I still don't get how string_expr helps, here as it also includedes a simple 
column name, which is ambiguous with the clause at line 3762. Can you try 
simply using expr instead of string_exprs in these clauses?


http://gerrit.cloudera.org:8080/#/c/21825/8/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/8/fe/src/main/java/org/apache/impala/analysis/TrimFromExpr.java@45
PS8, Line 45: slot_
The usage of slot is not completely clear to me:
- toSqlImpl() turns it into a string literal, so it will be quoted
- analyzeImpl() analyzes it as SlotRef

btw can you add a few tests for the new trim syntax in 
https://github.com/apache/impala/blob/master/fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java
 ?



--
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: 8
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: Thu, 24 Oct 2024 16:00:19 +0000
Gerrit-HasComments: Yes

Reply via email to