FAQ
aliasing flatten requires parenthesis around alias
--------------------------------------------------

Key: PIG-433
URL: https://issues.apache.org/jira/browse/PIG-433
Project: Pig
Issue Type: Bug
Affects Versions: types_branch
Reporter: Olga Natkovich
Assignee: Santhosh Srinivasan
Fix For: types_branch


Script:

a = load 'data' as (name, age, gpa);
b = foreach a generate flatten(name) as foo;

Error:

08/09/16 09:21:19 ERROR grunt.GruntParser: java.io.IOException: Encountered "foo" at line 1, column 41.
Was expecting:
"(" ...

at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:93)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
at org.apache.pig.Main.main(Main.java:282)
Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "foo" at line 1, column 41.
Was expecting:
"(" ...

at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:7656)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:7533)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3522)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3456)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3413)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2899)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2302)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:953)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:728)
at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:529)
at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
at org.apache.pig.PigServer.parseQuery(PigServer.java:290)
... 6 more

This a regression!

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

Search Discussions

  • Santhosh Srinivasan (JIRA) at Sep 17, 2008 at 8:12 pm
    [ https://issues.apache.org/jira/browse/PIG-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Santhosh Srinivasan updated PIG-433:
    ------------------------------------

    Attachment: PIG-433.patch

    Attached patch (PIG-433.patch) fixes the following:

    1. Parser now handles the AS clause with flatten without requiring the additional ( ). Without the parenthesis, only the first column will be re-aliased
    2. When bags or tuples without schemas are flattened and user provides an alias, the default type is set to bytearray. This part was omitted in an earlier fix.

    All unit tests pass.
    aliasing flatten requires parenthesis around alias
    --------------------------------------------------

    Key: PIG-433
    URL: https://issues.apache.org/jira/browse/PIG-433
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Santhosh Srinivasan
    Fix For: types_branch

    Attachments: PIG-433.patch


    Script:
    a = load 'data' as (name, age, gpa);
    b = foreach a generate flatten(name) as foo;
    Error:
    08/09/16 09:21:19 ERROR grunt.GruntParser: java.io.IOException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
    at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
    at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:93)
    at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
    at org.apache.pig.Main.main(Main.java:282)
    Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:7656)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:7533)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3522)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3456)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3413)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2899)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2302)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:953)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:728)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:529)
    at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
    at org.apache.pig.PigServer.parseQuery(PigServer.java:290)
    ... 6 more
    This a regression!
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Santhosh Srinivasan (JIRA) at Sep 17, 2008 at 9:50 pm
    [ https://issues.apache.org/jira/browse/PIG-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Santhosh Srinivasan updated PIG-433:
    ------------------------------------

    Patch Info: [Patch Available]
    aliasing flatten requires parenthesis around alias
    --------------------------------------------------

    Key: PIG-433
    URL: https://issues.apache.org/jira/browse/PIG-433
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Santhosh Srinivasan
    Fix For: types_branch

    Attachments: PIG-433.patch


    Script:
    a = load 'data' as (name, age, gpa);
    b = foreach a generate flatten(name) as foo;
    Error:
    08/09/16 09:21:19 ERROR grunt.GruntParser: java.io.IOException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
    at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
    at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:93)
    at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
    at org.apache.pig.Main.main(Main.java:282)
    Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:7656)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:7533)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3522)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3456)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3413)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2899)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2302)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:953)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:728)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:529)
    at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
    at org.apache.pig.PigServer.parseQuery(PigServer.java:290)
    ... 6 more
    This a regression!
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Sep 18, 2008 at 12:42 am
    [ https://issues.apache.org/jira/browse/PIG-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich resolved PIG-433.
    --------------------------------

    Resolution: Fixed

    patch committed. thanks, santhosh
    aliasing flatten requires parenthesis around alias
    --------------------------------------------------

    Key: PIG-433
    URL: https://issues.apache.org/jira/browse/PIG-433
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Santhosh Srinivasan
    Fix For: types_branch

    Attachments: PIG-433.patch


    Script:
    a = load 'data' as (name, age, gpa);
    b = foreach a generate flatten(name) as foo;
    Error:
    08/09/16 09:21:19 ERROR grunt.GruntParser: java.io.IOException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
    at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
    at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:93)
    at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
    at org.apache.pig.Main.main(Main.java:282)
    Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "foo" at line 1, column 41.
    Was expecting:
    "(" ...

    at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:7656)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:7533)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3522)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3456)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3413)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2899)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2302)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:953)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:728)
    at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:529)
    at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
    at org.apache.pig.PigServer.parseQuery(PigServer.java:290)
    ... 6 more
    This a regression!
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedSep 16, '08 at 4:25p
activeSep 18, '08 at 12:42a
posts4
users1
websitepig.apache.org

1 user in discussion

Olga Natkovich (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase