Zoltan Ivanfi has posted comments on this change. Change subject: IMPALA-784: Use `-s in SHOW CREATE TABLE output ......................................................................
Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/4527/2/fe/src/main/java/com/cloudera/impala/analysis/ToSqlUtils.java File fe/src/main/java/com/cloudera/impala/analysis/ToSqlUtils.java: Line 69: public static String getIdentSql(String ident) { > So we are in agreement then? I agree that it's slighly less pleasing to the eye but I think correctness/unambiguity is more important than aesthetics. Also Hive does the same, so I think people are used to it. Line 76: return Joiner.on(".").join(getStandaloneIdentSqlList((Splitter.on('.').split(ident)))); > select `a.b.c`.`x.y.z` from (select 1 `x.y.z`) `a.b.c` Hmmm. Interesting. On the other hand: > create view test as select `a.b.c`.`x.y.z` from (select 1 `x.y.z`) `a.b.c`; ERROR: AnalysisException: Invalid column/field name: x.y.z This is a serious problem, because it means that identifier names are ambigous. I checked that in case of a struct, functions get "column_name.field_name" as the column name. I haven't checked your example yet, but my guess is that in this case the column name parameter will become "x.y.z". Still, the former should be quoted as `column_name`.`field_name` and latter as `x.y.z`. It seems that it's too late to fix this problem by the time getIdentSql gets called. -- To view, visit http://gerrit.cloudera.org:8080/4527 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e66439daa35d2e3725e7277c16f3cc5fdb6f128 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Zoltan Ivanfi <z...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Zoltan Ivanfi <z...@cloudera.com> Gerrit-HasComments: Yes