You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Adam Szita (JIRA)" <ji...@apache.org> on 2016/10/25 11:49:58 UTC
[jira] [Commented] (PIG-4798) big integer literals fail to parse
[ https://issues.apache.org/jira/browse/PIG-4798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15605064#comment-15605064 ]
Adam Szita commented on PIG-4798:
---------------------------------
Looks like neither BigIntegers nor BigDecimals can be parsed like this, altough their lexer definition matches correctly to the notation used above ( https://github.com/apache/pig/blob/trunk/src/org/apache/pig/parser/QueryLexer.g#L380 )
The problem is that these token types are not listed under 'scalar' in QueryParser.g . Because of this the generated QueryParser.java/scalar() method will not recognise these types and also no valid transitions are generated in the appropriate state machine (QuerParser.java/DFA141) from BI or BD types.
On top of this LogicalPlanBuilder.java/parseBigInteger only cuts one character from "12346BI"-like values - need to adjust this to 2 chars.
[^PIG-4798.patch] will fix this and adds some tests too.
[~daijy], [~jcoveney] can you please take a look?
> big integer literals fail to parse
> ----------------------------------
>
> Key: PIG-4798
> URL: https://issues.apache.org/jira/browse/PIG-4798
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.15.0, 0.16.0
> Reporter: Savvas Savvides
> Assignee: Adam Szita
> Attachments: PIG-4798.patch
>
>
> For example:
> x < 12345678901234567890
> with x being a biginteger tries to parse the literal as Integer.
> x < 12345678901234567890BI
> "BI" is not recognized
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)