'Hive comment with ";" still got executed with exception
I want to temporarily comment some SQL statements in the hive script with --, but the statement will be still executed as it includes ";" at the end. I expect -- should comment out the whole line, seem it's not the case in HIVE. How can I comment a full line?
e.g.
-- SELECT "ABC";
Give exception:
NoViableAltException(-1@[])
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1027)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:201)
...
FAILED: ParseException line 1:15 cannot recognize input near '<EOF>' '<EOF>' '<EOF>'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
