[jira] [Commented] (PIG-2083) bincond ERROR 1025: Invalid field projection when null is used
[ https://issues.apache.org/jira/browse/PIG-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039242#comment-13039242 ] Richard Ding commented on PIG-2083: --- +1 > bincond ERROR 1025: Invalid field projection when null is used > -- > > Key: PIG-2083 > URL: https://issues.apache.org/jira/browse/PIG-2083 > Project: Pig > Issue Type: Bug > Components: build >Affects Versions: 0.9.0 > Environment: Linux 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:27 EST > 2008 x86_64 x86_64 x86_64 GNU/Linux > Hadoop 0.20.203.3.1104011556 -r 96519d04f65e22ffadf89b225d0d44ef1741d126 > Compiled on Fri Apr 1 16:29:09 PDT 2011 >Reporter: Araceli Henley >Assignee: Thejas M Nair > Fix For: 0.9.0 > > Attachments: PIG-2083.1.patch > > > This is a regression for 9. > a = load '1.txt' as (a0, a1); > b = foreach a generate (a0==0?null:2); > explain b; > ERROR 1025: > Invalid field projection. Projected field [null] does not exist in schema -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2083) bincond ERROR 1025: Invalid field projection when null is used
[ https://issues.apache.org/jira/browse/PIG-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039200#comment-13039200 ] Thejas M Nair commented on PIG-2083: PIG-2083.1.patch - I have removed the NULL literal from QueryLexer.g and replaced IDENTIFIER in it with IDENTIFIER_L. In QueryParser.g IDENTIFIER_L gets replaced by NULL or IDENTIFIER using semantic predicates. I could not find a solution that could get the resolution of NULL vs IDENTIFIER done in QueryLexer itself. > bincond ERROR 1025: Invalid field projection when null is used > -- > > Key: PIG-2083 > URL: https://issues.apache.org/jira/browse/PIG-2083 > Project: Pig > Issue Type: Bug > Components: build >Affects Versions: 0.9.0 > Environment: Linux 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:27 EST > 2008 x86_64 x86_64 x86_64 GNU/Linux > Hadoop 0.20.203.3.1104011556 -r 96519d04f65e22ffadf89b225d0d44ef1741d126 > Compiled on Fri Apr 1 16:29:09 PDT 2011 >Reporter: Araceli Henley >Assignee: Thejas M Nair > Fix For: 0.9.0 > > Attachments: PIG-2083.1.patch > > > This is a regression for 9. > a = load '1.txt' as (a0, a1); > b = foreach a generate (a0==0?null:2); > explain b; > ERROR 1025: > Invalid field projection. Projected field [null] does not exist in schema -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2083) bincond ERROR 1025: Invalid field projection when null is used
[ https://issues.apache.org/jira/browse/PIG-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038409#comment-13038409 ] Xuefu Zhang commented on PIG-2083: -- This is probably not caused by Antlr, but by Pig's syntactic rule. IDENTIFIER : ( ID DCOLON ) => ( ID DCOLON IDENTIFIER ) | ID ; When Antlr say NULL, it cannot make a decision until it says the next character, which is a colon. With the colon, the above rule applies, so it tries to match IDENTIFIER. As a result of such matching, it ends with two tokens, IDENTIFIER and ':'. When there is a space, above rule doesn't apply. I don't know a good solution yet. A potential solution is to add predicate for all reserved keyword such that matching stops as long as the next character is not a letter. In this way, 'null:' will be match to NULL as a keyword, and ':'. > bincond ERROR 1025: Invalid field projection when null is used > -- > > Key: PIG-2083 > URL: https://issues.apache.org/jira/browse/PIG-2083 > Project: Pig > Issue Type: Bug > Components: build >Affects Versions: 0.9.0 > Environment: Linux 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:27 EST > 2008 x86_64 x86_64 x86_64 GNU/Linux > Hadoop 0.20.203.3.1104011556 -r 96519d04f65e22ffadf89b225d0d44ef1741d126 > Compiled on Fri Apr 1 16:29:09 PDT 2011 >Reporter: Araceli Henley >Assignee: Thejas M Nair > Fix For: 0.9.0 > > > This is a regression for 9. > a = load '1.txt' as (a0, a1); > b = foreach a generate (a0==0?null:2); > explain b; > ERROR 1025: > Invalid field projection. Projected field [null] does not exist in schema -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2083) bincond ERROR 1025: Invalid field projection when null is used
[ https://issues.apache.org/jira/browse/PIG-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038334#comment-13038334 ] Thejas M Nair commented on PIG-2083: In the above query, the tokeniser is matching NULL as identifier instead of the NULL token. The above query works when there is a space after the null. The parser generated by antlr is supposed to match NULL token as that rule comes before the identifier rule. This looks like a bug in antlr. > bincond ERROR 1025: Invalid field projection when null is used > -- > > Key: PIG-2083 > URL: https://issues.apache.org/jira/browse/PIG-2083 > Project: Pig > Issue Type: Bug > Components: build >Affects Versions: 0.9.0 > Environment: Linux 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:27 EST > 2008 x86_64 x86_64 x86_64 GNU/Linux > Hadoop 0.20.203.3.1104011556 -r 96519d04f65e22ffadf89b225d0d44ef1741d126 > Compiled on Fri Apr 1 16:29:09 PDT 2011 >Reporter: Araceli Henley >Assignee: Thejas M Nair > Fix For: 0.9.0 > > > This is a regression for 9. > a = load '1.txt' as (a0, a1); > b = foreach a generate (a0==0?null:2); > explain b; > ERROR 1025: > Invalid field projection. Projected field [null] does not exist in schema -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira