Details

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

      Description

      I want to generate data with bags, so I did this,

      take a simple text file b.txt

      100 apple
      200 orange
      300 pear
      400 apple

      then run query:

      a = load 'b.txt' as (id, f);
      b = group a by id;
      store b into 'g' using BinStorage();

      then run another query to load data generated from previous step.

      a = load 'g/part*' using BinStorage() as (id, d:bag

      {t:(v, s)}

      );
      b = foreach a generate (double)id, flatten(d);
      dump b;

      then I got the following result:

      (,100,apple)
      (,100,apple)
      (,200,orange)
      (,200,apple)
      (,300,strawberry)
      (,300,pear)
      (,400,pear)

      the value for id is gone. If there is no cast, then the result is correct.

        Issue Links

          Activity

          Ying He created issue -
          Alan Gates made changes -
          Field Original Value New Value
          Assignee Alan Gates [ alangates ]
          Fix Version/s 0.9.0 [ 12315191 ]
          Priority Major [ 3 ] Minor [ 4 ]
          Daniel Dai made changes -
          Link This issue is part of PIG-1745 [ PIG-1745 ]
          Alan Gates made changes -
          Assignee Alan Gates [ alangates ] Daniel Dai [ daijy ]
          Olga Natkovich made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Olga Natkovich made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Daniel Dai
              Reporter:
              Ying He
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development