[ 
https://issues.apache.org/jira/browse/HIVE-2439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvel Thirumoolan updated HIVE-2439:
---------------------------------------

    Attachment: HIVE-2439_branch9_3.patch

This patch addresses the issues related to views that were failing before. With 
this all previous failing tests pass. Early feedback welcome. Here is a 
description of the problem related to views.

UnparseTranslator() has a translation map where its possible to replace all the
text with the appropriate escaped version [say invites.ds will be replaced with
`invites`.`ds` and the entire query is processed like this and stored as
Extended text in table's metadata]. This holds all individual translations and
where they apply in the stream. The newer antlr has some conditions on
overlap. Two of the entries in this translation map can be disjoint or even the
same, but there cannot be partial overlap, which causes the exception.

Some of the entries during join_view.q: One can think of the below as 
UnparseTranslator.translations entries.

Start: Stop: Replacement Text
..
39:41:`invites`.`ds`
41:41:`ds`
43:45:`invites2`.`ds`
45:45:`ds`
..

Other translations don't seem to have a problem. Whenever SemanticAnalyser
finds that a translation is required, it will add it to the translation map. In
this case "41:41:`ds`" is being added by parseJoinCondPopulateAlias() for the
HiveParser.Identifier case. And "43:45:`invites2`.`ds`" is done by
genExprNodeDesc() after this during plan generation. So there is a duplicate 
entry. UnparseTranslator.addTranslation() has logic to eliminate subsets but 
seem to miss this. Have included this situation in the patch.
                
> 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_3.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