[
https://issues.apache.org/jira/browse/HIVE-26175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528101#comment-17528101
]
renjianting commented on HIVE-26175:
------------------------------------
[~asolimando], I have updated the problem description and found the problem
raised。 when I executed using "hive -f xx.sql". And I found the same problem
with the latest 4.0 distribution 'apache-hive-4.0.0-alpha-1'. Can you double
check the current master branch with "hive -f"?
In fact, when dividing multiple SQL statements in a file by semicolon, I think
we should ignore quote character matches after comment symbols in single-line
statements.
> single quote in a comment causes parsing errors
> -----------------------------------------------
>
> Key: HIVE-26175
> URL: https://issues.apache.org/jira/browse/HIVE-26175
> Project: Hive
> Issue Type: Improvement
> Components: CLI, Parser
> Affects Versions: 3.1.3
> Reporter: renjianting
> Assignee: renjianting
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> A single quote in a comment causes parsing errors:
> task.sql
> {code:java}
> select 1 -- comment I'm col1"xxx
> ;
> select 2 -- comment I'm col2"xxx
> ;{code}
> The following error occurs when I run a similar task using the "hive -f
> task.sql" command :
> {code:java}
> FAILED: ParseException line 2:0 cannot recognize input near '1' ';' 'select'
> in constant{code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)