Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21575 )

Change subject: IMPALA-13221: Calcite: Enable tpcds and tpch queries
......................................................................


Patch Set 9:

(1 comment)

Posting a comment I had on the last upload

http://gerrit.cloudera.org:8080/#/c/21575/9/java/calcite-planner/src/main/codegen/templates/Parser.jj
File java/calcite-planner/src/main/codegen/templates/Parser.jj:

http://gerrit.cloudera.org:8080/#/c/21575/9/java/calcite-planner/src/main/codegen/templates/Parser.jj@4654
PS9, Line 4654:     <QUOTED_IDENTIFIER>
I'm going to dump some things here, but I don't know which should influence 
this code change. We are clearly making progress here, and I don't want to bog 
it down.

Impala string literals are closer to the BigQuery style than the Calcite style. 
As examples, Impala uses backslash to escape things like quotes. i.e. "abc \" 
123" is a valid string literal (similarly 'abc \' 123' is also valid). Calcite 
currently won't parse that, because it uses a different way of escaping quotes 
(i.e. '' is an escaped single quote). Impala doesn't understand that form (i.e. 
'abc '' 123' is not valid).

Oddly enough, Impala can have an actual newline character in a string literal 
(which is a no-no for QUOTED_IDENTIFIER) e.g.

select "abc
123";

The newline is actually preserved. That's weird and maybe we shouldn't support 
that, but it's there.

So, I wonder if there is a way we can use the BIG_QUERY_DOUBLE_QUOTED_STRING / 
BIG_QUERY_QUOTED_STRING or mimic it.

As an orthogonal thing (which is not about parsing), Impala supports special 
characters via backlash escape sequences. "abc\n123" will actually display a 
newline when selected from impala-shell.



--
To view, visit http://gerrit.cloudera.org:8080/21575
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3107d336ac07ecd89530b640165798ec6a574f41
Gerrit-Change-Number: 21575
Gerrit-PatchSet: 9
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Wed, 09 Oct 2024 23:34:17 +0000
Gerrit-HasComments: Yes

Reply via email to