Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3000

Optimize nested foreach

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.0
    • None
    • impl
    • None

    Description

      In this Pig script:

      A = load 'data' as (a:chararray);
      B = foreach A { c = UPPER(a); generate ((c eq 'TEST') ? 1 : 0), ((c eq 'DEV') ? 1 : 0); }
      

      The Eval function UPPER is called twice for each record.

      This should be optimized so that the UPPER is called only once for each record

      Attachments

        1. unit_tests.patch
          10 kB
          Mona Chitnis
        2. PIG-3000-6.patch
          23 kB
          Mona Chitnis

        Issue Links

          Activity

            People

              rohini Rohini Palaniswamy
              rding Richard Ding
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: