Pig
  1. Pig
  2. PIG-2682

pig harness does not correctly count the number of stores for multiple invocations of the same macro

    Details

    • Type: Test Test
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: e2e harness
    • Labels:
      None

      Description

      For example, in this macro, TestDriverPig.countStores will only count the number of stores in the "test" macro, not the number of times store is invoked.

      test (in, out, column, filter_value ) returns b

      { a = load '$in' as (name: chararray, age: int, gpa: float); $b = filter a by $column < $filter_value ; store $b into '$out'; }

      x = test( '/user/hadoopqa/pignightly/tests/data/singlefile/studenttab10k', '/user/hadoopqa/pignightly/out/hadoopqa.1336171525/Y_Macro_Misc_7.out.1', 'age', 22 );
      x = test( '/user/hadoopqa/pignightly/tests/data/singlefile/studenttab10k', '/user/hadoopqa/pignightly/out/hadoopqa.1336171525/Y_Macro_Misc_7.out.2', 'gpa', 3.0 );

      There's no easy work around.

        Activity

        Hide
        Andrey Klochkov added a comment -

        How about adding a parameter "expected_outfiles_count" into the hash for tests which do that? If the parameter is presented then TestDriverPig.countStores would just pick this value instead of trying to parse the script. It's not going to be used often so an additional inconvenience should be acceptable.

        Show
        Andrey Klochkov added a comment - How about adding a parameter "expected_outfiles_count" into the hash for tests which do that? If the parameter is presented then TestDriverPig.countStores would just pick this value instead of trying to parse the script. It's not going to be used often so an additional inconvenience should be acceptable.

          People

          • Assignee:
            Unassigned
            Reporter:
            Araceli Henley
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development