[ https://issues.apache.org/jira/browse/HIVE-13864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880749#comment-15880749 ]
Aihua Xu commented on HIVE-13864: --------------------------------- OK. Seems we are only removing the comments if the whole line is a comment. It makes sense to also detect the comment in a line. So the patch is trying to detect if -- is inside a string or not, right? Seems we need to handle the case if the string is across the line with --. That may cause issues like select 'afddb -- ddd' from src; > Beeline ignores the command that follows a semicolon and comment > ---------------------------------------------------------------- > > Key: HIVE-13864 > URL: https://issues.apache.org/jira/browse/HIVE-13864 > Project: Hive > Issue Type: Bug > Reporter: Muthu Manickam > Assignee: Yongzhi Chen > Attachments: HIVE-13864.01.patch, HIVE-13864.02.patch, > HIVE-13864.3.patch > > > Beeline ignores the next line/command that follows a command with semicolon > and comments. > Example 1: > select * > from table1; -- comments > select * from table2; > In this case, only the first command is executed.. second command "select * > from table2" is not executed. > ------ > Example 2: > select * > from table1; -- comments > select * from table2; > select * from table3; > In this case, first command and third command is executed. second command > "select * from table2" is not executed. -- This message was sent by Atlassian JIRA (v6.3.15#6346)