impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
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:

File shell/

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.
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
To unsubscribe, visit

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 <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Casey Ching <>
Gerrit-Reviewer: Ishaan Joshi <>
Gerrit-HasComments: Yes

View raw message