Mihaly Szjatinya 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 17:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21825/17/docs/topics/impala_string_functions.xml
File docs/topics/impala_string_functions.xml:

http://gerrit.cloudera.org:8080/#/c/21825/17/docs/topics/impala_string_functions.xml@1808
PS17, Line 1808:           TRIM(STRING a), TRIM({[LEADING / TRAILING / BOTH] | 
[STRING chars_to_trim]} FROM STRING a)
> TRIM([LEADING | TRAILING | BOTH] [STRING chars_to_trim] FROM STRING a)

This was my first thought, but doesn't this technically allow specifying none 
of the optional [] clauses?

I was looking for a way to say: "at least one of the two clauses", i.e. both is 
ok, none is not ok. But curly braces is not suitable here, since it is an 
exclusive OR, you're right.

Seems like the correct way is:
{[A] | [B] | [A] [B]},
but I agree to get back to simple, if you confirm:
[A] [B]


http://gerrit.cloudera.org:8080/#/c/21825/17/docs/topics/impala_string_functions.xml@1834
PS17, Line 1834:             <codeph>{LRB}TRIM(string)</codeph>;
> What's {LRB}?
"LTRIM, RTRIM or BTRIM", but it should be with pipe sign:
"{L|R|B}TRIM". Is that ok?



--
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: 17
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: Michael Smith <[email protected]>
Gerrit-Reviewer: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Comment-Date: Sun, 24 Nov 2024 17:19:46 +0000
Gerrit-HasComments: Yes

Reply via email to