[ https://issues.apache.org/jira/browse/IMPALA-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522546#comment-16522546 ]
Fredy Wijaya commented on IMPALA-2195: -------------------------------------- https://git-wip-us.apache.org/repos/asf?p=impala.git;h=555d4a0219d32237cdc2d097ad04e2b4c39145b3 IMPALA-2195: Improper handling of comments in queries This patch fixes an issue where parseline is unable to deduce the correct command when a statement has a leading comment. Before: > -- comment > insert into table t values(100); Fetched 1 row(s) in 0.01s After: > -- comment > insert into table t values(100); Modified 1 row(s) in 0.01s Before (FE syntax error): > /*comment*/ help; After (show help correctly): > /*comment*/ help; Testing: - Added shell tests - Ran end-to-end shell tests on Python 2.6 and Python 2.7 Change-Id: I7ac7cb5a30e6dda73ebe761d9f0eb9ba038e14a7 Reviewed-on: http://gerrit.cloudera.org:8080/9933 Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Reviewed-by: Bharath Vissapragada <bhara...@cloudera.com> > Improper handling of comments in queries > ---------------------------------------- > > Key: IMPALA-2195 > URL: https://issues.apache.org/jira/browse/IMPALA-2195 > Project: IMPALA > Issue Type: Bug > Components: Clients > Affects Versions: Impala 2.2, Impala 2.3.0 > Reporter: bharath v > Assignee: Fredy Wijaya > Priority: Minor > Labels: shell > Fix For: Impala 2.13.0, Impala 3.1.0 > > > Shell doesn't handle comments properly while executing the queries. For > example, > {noformat} > [impalad:21000] > ----- random comment 1 > -----### random comment 2 > insert overwrite test2 select * from test1; > Query: ----- random comment 1 > -----### random comment 2 > insert overwrite test2 select * from test1 > Fetched 0 row(s) in 3.53s > {noformat} > Stderr for an insert query shows up as "Fetched 0 row(s)" instead of > "Inserted 1 row(s)" . This happens because the shell parser doesn't detect > this as an insert query due to the presence of comments. We don't strip the > comments before sending them to Cmd control, due which the default() method > is applied instead of do_insert(). -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org