Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/19866 )
Change subject: IMPALA-12126: fix keywords and builtin function names conflict. ...................................................................... Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/19866/1/fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java File fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java: http://gerrit.cloudera.org:8080/#/c/19866/1/fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java@656 PS1, Line 656: testToSql("select 1 as `ilike`", "SELECT 1 `ilike`"); hmm, I can run this without the fix. I think the problem is Impala unquote the alias name when creating the view in HMS. For instance, for the view created in Impala as create view v as select 1 `ilike`; run DESCRIBE FORMATTED on it in Hive, I can see the alias name "ilike" is unquoted: | # View Information | NULL | NULL | | Original Query: | SELECT 1 ilike | NULL | | Expanded Query: | SELECT 1 ilike | NULL | However, if I create the view in Hive, the expanded query has the quoted alias: | # View Information | NULL | NULL | | Original Query: | select 1 as ilike | NULL | | Expanded Query: | select 1 as `ilike` | NULL | Impala can load the view created in Hive. I think what we should fix is how Impala create the view in HMS. -- To view, visit http://gerrit.cloudera.org:8080/19866 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I818fbd5170576d40ee9d50798b42fe4532d7dbeb Gerrit-Change-Number: 19866 Gerrit-PatchSet: 1 Gerrit-Owner: Xiang Yang <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Xiang Yang <[email protected]> Gerrit-Comment-Date: Thu, 29 Jun 2023 05:02:31 +0000 Gerrit-HasComments: Yes
