[
https://issues.apache.org/jira/browse/HIVE-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970972#action_12970972
]
Adam Kramer commented on HIVE-1731:
-----------------------------------
FAILED: Parse Error: line 0:-1 mismatched input '<EOF>' expecting ) in subquery
source
No error that refers to lines 0:-1 is ever useful. Here is an example query:
INSERT OVERWRITE TABLE my_table
SELECT TRANSFORM(b.user1, b.user2, b.cnt)
USING '{tr}'
AS c1,c2,c3,c4
FROM (
SELECT b.user1, b.user2, b.cnt FROM (
SELECT user1, user2, COUNT(1) AS cnt
FROM sourcetable
WHERE ds > '2010-12-01' AND ds <= '2010-12-07'
GROUP BY user1, user2
DISTRIBUTE BY user1 SORT BY user1, cnt
) b;
...the problem here is that the inner query is not indented and lacks a ). This
error message should report the error as being at the ;, which is to say 12:4.
Since the message knows an rparen is missing, it should also provide the index
of the lparen. It should read like this:
FAILED: Parse Error: line 12:4 mismatched input '<EOF>' expecting ) in subquery
source to close ( at line 5:6.
> Improve miscellaneous error messages
> ------------------------------------
>
> Key: HIVE-1731
> URL: https://issues.apache.org/jira/browse/HIVE-1731
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Reporter: John Sichi
> Fix For: 0.7.0
>
>
> This is a place for accumulating error message improvements so that we can
> update a bunch in batch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.