Paul Rogers has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12009 )

Change subject: IMPALA-7905: Hive keywords not quoted for identifiers
......................................................................


Patch Set 7:

(2 comments)

Addressed recent review comments.

http://gerrit.cloudera.org:8080/#/c/12009/5/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
File fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java:

http://gerrit.cloudera.org:8080/#/c/12009/5/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java@116
PS5, Line 116: an identifier
> I meant to refer to the method argument @ident here. But it is fine. Not to
Took a second look. The text was ambiguous, using "identifier" for two distinct 
concepts. Reworded to be clearer.


http://gerrit.cloudera.org:8080/#/c/12009/5/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java@148
PS5, Line 148: /
             :   public static boolean impalaNeedsQuotes(String ident) {
             :     return SqlScanner.isReserved(ident) ||
             :       // Impala's scanner recognizes the ".123" portion of 
"db.123e45" as a decimal,
             :       // so while the quoting is not necessary
> ya, 123e45 is a valid decimal literal but not .123 part like you mentioned
Reworded the comment and inserted an actual example that illustrates the issue. 
"3a3" is a fine unquoted identifier. "3e3" must be quoted, else it is a double. 
So, to be safe, we quote all identifiers that start with a digit.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06cc20b052a3a66535a171c36b4b31477c0ba6d0
Gerrit-Change-Number: 12009
Gerrit-PatchSet: 7
Gerrit-Owner: Paul Rogers <prog...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Paul Rogers <prog...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Jan 2019 00:37:35 +0000
Gerrit-HasComments: Yes

Reply via email to