[
https://issues.apache.org/jira/browse/PIG-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lorand Bendig updated PIG-3670:
-------------------------------
Attachment: PIG-3670-2_addition.patch
Thanks for fixing it! Now ASSERT works fine, however, grammar allows to assign
alias to it which may lead to the following issue:
{code}
A = load 'data.txt' AS (a0:int,a1:int,a2:int);
B = ASSERT A by a0 >= 5, 'a0 should be >= 5';
describe B;
14/02/09 10:21:04 ERROR grunt.Grunt: ERROR 1003: Unable to find an operator for
alias B
C = foreach B generate $0;
14/02/09 10:22:08 ERROR grunt.Grunt: ERROR 1200: Pig script failed to parse:
<line 3, column 4> pig script failed to validate: Unrecognized alias B
{code}
I'd address this issue by changing the grammar so that assigning alias will not
be possible (similar to SPLIT).
> Fix assert in Pig script
> ------------------------
>
> Key: PIG-3670
> URL: https://issues.apache.org/jira/browse/PIG-3670
> Project: Pig
> Issue Type: Bug
> Components: impl
> Reporter: Daniel Dai
> Assignee: Daniel Dai
> Fix For: 0.12.1, 0.13.0
>
> Attachments: PIG-3670-1.patch, PIG-3670-2.patch,
> PIG-3670-2_addition.patch
>
>
> PIG-3367 introduce "assert" keyword. However, it can only be used in Java
> embedding, when use registerQuery. In Pig script or Grunt shell, GruntParser
> will complain.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)