You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2020/04/10 02:22:00 UTC

[jira] [Commented] (HIVE-15577) Simplify current parser

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

David Mollitor commented on HIVE-15577:
---------------------------------------

I am investigating [HIVE-23172] and I am having a problem addressing this because I am getting the following error from compiling the grammar:
 
{code:none}
hive-parser: Compilation failure
[ERROR] /home/apache/hive/hive/parser/target/generated-sources/antlr3/org/apache/hadoop/hive/ql/parse/HiveParser.java:[40,38] code too large
 {code}

I traced it down to the fact that there are too many token defined.  In HiveParser.java, it has the following:

{code:java} 
public static final String[] tokenNames = new String[] \{ ... };
{code}
 
That list is so long, it's breaking Java compilation.
 
I observed that the parser defines two token for most elements, for example:
 
KW_TRUNCATE / TOK_TRUNCATETABLE
 
I propose consolidating this down to one and conserve some space.  I would propose just using  KW_TRUNCATE and get rid of the TOK version.

> Simplify current parser
> -----------------------
>
>                 Key: HIVE-15577
>                 URL: https://issues.apache.org/jira/browse/HIVE-15577
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>            Priority: Major
>
> We encountered "code too large" problem frequently. We need to reduce the code size.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)