hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-416) Get rid of backtrack in Hive.g
Date Thu, 16 Apr 2009 22:04:14 GMT

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

Zheng Shao commented on HIVE-416:
---------------------------------

> About the comment on optional brackets - clearly these are optional in expressions. So
how do we support those expression e.g (a+b) and a+b are both valid sql expressoins if we
cannot support this without backtracking...

We do support "(a+b)" and "a+b".

The problem is that there is no easy way of supporting both "((((a))), b)" and "((((a)))),
b". No matter what is k, it's not possible to determine whether the first "(" is the optional
bracket for the expression list, or just part of the first expression.

I will need to go over the antlr book to know more about Semantic/Syntactic predicate to know
whether that is possible.

> Identifier DOT Identifier.
Treating it as a lexical rule won't allow both T.a.b and a.b.  I am making a first Identifier
a TOK_TABLE_OR_COL. I will let SemanticAnalyzer to decide whether it is a table name or column
name. Not sure that should go into the same transaction or not since it's a much bigger change.


> Get rid of backtrack in Hive.g
> ------------------------------
>
>                 Key: HIVE-416
>                 URL: https://issues.apache.org/jira/browse/HIVE-416
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.4.0
>
>         Attachments: HIVE-416.1.1.patch, HIVE-416.1.patch
>
>
> Hive.g now still uses "backtrack=true". "backtrack" not only slows down the parsing in
case of error, it can also produce wrong syntax error messages (usually based on the last
try of the backtracking).
> We should follow http://www.antlr.org/wiki/display/ANTLR3/How+to+remove+global+backtracking+from+your+grammar
to remove the need of doing backtrack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message