[ https://issues.apache.org/jira/browse/HIVE-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066304#comment-13066304 ]
Matt Martin commented on HIVE-1926: ----------------------------------- I also ran into this issue and another similar but probably unrelated issue. In particular, I noticed that the following script works fine: {code:sql} select * from dummy limit 1; {code} but the following version of the script generates the same error as dan f reported (i.e. FAILED: Parse Error: line 0:-1 cannot recognize input '<EOF>'): {code:sql} select * from dummy limit 1; – unsafe end of script comment {code} An error caused by a comment at the end of a script is probably less severe than the original error reported by dan f since it does not actually affect the "select * ..." statement which precedes it. That being said, it would still be nice if the second script ran without any errors. In general, I would guess that both errors represent a fairly common class of errors which are especially likely to occur if people comment out sections of their script. > semicolon in comment causes parse error > --------------------------------------- > > Key: HIVE-1926 > URL: https://issues.apache.org/jira/browse/HIVE-1926 > Project: Hive > Issue Type: Bug > Components: Query Processor > Reporter: dan f > > semicolons in sql comments cause a parse error when trying to execute the > query via hive -f > As an example, this query runs fine: > -- a safe comment > select * from table; > but this query > -- an unsafe comment; > select * from table; > results in: > FAILED: Parse Error: line 0:-1 cannot recognize input '<EOF>' -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira