[ 
https://issues.apache.org/jira/browse/HIVE-2439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13512117#comment-13512117
 ] 

Thiruvel Thirumoolan commented on HIVE-2439:
--------------------------------------------

There are two failures in TestCliDriver related to views which are a little 
weird (exception at the end). As per [1], during Semantic Analyzer, Hive 
expands a query [say replace with all columns if there is a *]. This is 
achieved using antlr TokenRewriteStream class. The inputs to this class from 
Hive hasn't changed because of the version bump (or updated Lexer/Parser), but 
TokenRewriteStream.toString() has undergone almost a rewrite when compared to 
3.0.1 when comparing the sources. The IllegalArgumentException is due to the 
additional code in 3.4.

This does not happen with all view related tests. Going by the test case 
failures, it happens when there is a join. Other test cases related to lateral 
views, UDF/UDTF all  pass, but two tests related to join fail [a view being 
created from join of tables]. Failed test cases: join_view.q and 
ppd_union_view.q. Not sure if there is a problem in the way we are using this 
API.

[1] - 
https://cwiki.apache.org/confluence/display/Hive/ViewDev#ViewDev-StoredViewDefinition

Exception:

...
create view v as select invites.bar, invites2.foo, invites2.ds from invites
join invites2 on invites.ds=invites2.ds
...
2012-12-04 10:59:19,647 DEBUG parse.SemanticAnalyzer
(SemanticAnalyzer.java:genPlan(6766)) - Created Plan for Query Block null
2012-12-04 10:59:19,648 ERROR ql.Driver (SessionState.java:printError(400)) -
FAILED: Hive Internal Error: java.lang.IllegalArgumentException(replace op
boundaries of
<ReplaceOp@[@41,138:139='ds',<24>,5:101]..[@41,138:139='ds',<24>,5:101]:"`ds`">
overlap with previous
<ReplaceOp@[@39,130:136='invites',<24>,5:93]..[@41,138:139='ds',<24>,5:101]:"`invites`.`ds`">)
java.lang.IllegalArgumentException: replace op boundaries of
<ReplaceOp@[@41,138:139='ds',<24>,5:101]..[@41,138:139='ds',<24>,5:101]:"`ds`">
overlap with previous
<ReplaceOp@[@39,130:136='invites',<24>,5:93]..[@41,138:139='ds',<24>,5:101]:"`invites`.`ds`">
        at
org.antlr.runtime.TokenRewriteStream.reduceToSingleOperationPerIndex(TokenRewriteStream.java:504)
        at
org.antlr.runtime.TokenRewriteStream.toString(TokenRewriteStream.java:374)
        at
org.antlr.runtime.TokenRewriteStream.toString(TokenRewriteStream.java:358)
        at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.saveViewDefinition(SemanticAnalyzer.java:7602)
        at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7537)
        at
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
                
> Upgrade antlr version to 3.4
> ----------------------------
>
>                 Key: HIVE-2439
>                 URL: https://issues.apache.org/jira/browse/HIVE-2439
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 0.8.0
>            Reporter: Ashutosh Chauhan
>         Attachments: HIVE-2439_branch9_2.patch, HIVE-2439_branch9.patch, 
> hive-2439_incomplete.patch
>
>
> Upgrade antlr version to 3.4

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to