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)
SELECT b.user1, b.user2, b.cnt FROM (
SELECT user1, user2, COUNT(1) AS cnt
WHERE ds > '2010-12-01' AND ds <= '2010-12-07'
GROUP BY user1, user2
DISTRIBUTE BY user1 SORT BY user1, cnt
...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.