impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-2.6.0_5.8.0) IMPALA-2336: Ignore trailing comments in non-interactive mode
Date Thu, 26 May 2016 07:31:32 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-2336: Ignore trailing comments in non-interactive mode
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3169/1/shell/impala_shell.py
File shell/impala_shell.py:

Line 1171:   # Remove trailing comments, if any
> Makes sense. But, I think this specific case of trailing comments is annoyi
Bharath and I discussed this and alternative solutions ad absurdum, and we concluded that
this solution is the best option for the short to medium term. Ishaan is right regarding the
dependency and consistency assumption, but we already make that assumption in sqlparse.split(),
so it seems like we are not making it worse. The new code is also in exactly the same place.

The other alternatives were just way more ugly with a larger surface area. The fix here is
local, and I don't see how it could break existing scripts. On the other hand it will make
some more sensible scripts succeed.


http://gerrit.cloudera.org:8080/#/c/3169/1/tests/shell/test_file_comments.sql
File tests/shell/test_file_comments.sql:

Line 16: -- Multi line trailing comment
also add at least one complex multi-line /* */ comment with some non-comment stuff inside,
for example
 
/*
-- comment within-comment
select * from foo where '--';
with t1 as (not valid sql)
/* comment within-comment */
*/


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I723763ef7eedd03cf22058fadf06e9673a0d94d2
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.6.0_5.8.0
Gerrit-Owner: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Casey Ching <casey@cloudera.com>
Gerrit-Reviewer: Ishaan Joshi <ishaan@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message