Pig
  1. Pig
  2. PIG-2636

"duplicate uid in schema" error from script that uses multiple FOREACH on same relation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.11
    • Component/s: None
    • Labels:
      None

      Description

      The following script:

      A = LOAD 'bug.in' AS a:tuple(x:int, y:int);
      B1 = FOREACH A GENERATE a.x, a.y;
      B2 = FOREACH A GENERATE a.x, a.y;
      C = JOIN B1 BY x, B2 by x;

      yields the following error:

      org.apache.pig.impl.plan.PlanValidationException: ERROR 2270: Logical plan invalid state: duplicate uid in schema : B1::x#35:int,B1::y#36:int,B2::x#35:int,B2::y#36:int

        Activity

        Hide
        Eli Finkelshteyn added a comment -

        Using cogroup instead of join is a work around for this (i.e. just replace "join" with "cogroup"). You'll need to handle the result set slightly differently, but anything possible with a join is also possible with a cogroup.

        I'm pretty sure the issue here is the same as the one in https://issues.apache.org/jira/browse/PIG-3020 and is solved for 0.11.

        Show
        Eli Finkelshteyn added a comment - Using cogroup instead of join is a work around for this (i.e. just replace "join" with "cogroup"). You'll need to handle the result set slightly differently, but anything possible with a join is also possible with a cogroup. I'm pretty sure the issue here is the same as the one in https://issues.apache.org/jira/browse/PIG-3020 and is solved for 0.11.
        Hide
        Cheolsoo Park added a comment -

        Closing this as it is resolved by PIG-3020.

        Show
        Cheolsoo Park added a comment - Closing this as it is resolved by PIG-3020 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Pete Gieser
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development