Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: None
    • Labels:
    • Release Note:
      Hide
      Pig includes a new RANK operator:
      RANK <relation> ( BY <column> (ASC|DES)? (DENSE)? )?
      This operator prepends a consecutive integer to each tuple in the relation starting from 1.
      If the BY clause is present, RANK sorts the relation before ranking it, otherwise it uses the order in which it receives the relation (e.g. the order in which the relation is stored if RANK is performed right after a LOAD).
      The DENSE modifier produces a dense rank, which has no gaps in it regardless of ties.

      RANK is now a reserved keyword and is *not* backward compatible.
      Please review your scripts to avoid usage of RANK as a relation name.
      Show
      Pig includes a new RANK operator: RANK <relation> ( BY <column> (ASC|DES)? (DENSE)? )? This operator prepends a consecutive integer to each tuple in the relation starting from 1. If the BY clause is present, RANK sorts the relation before ranking it, otherwise it uses the order in which it receives the relation (e.g. the order in which the relation is stored if RANK is performed right after a LOAD). The DENSE modifier produces a dense rank, which has no gaps in it regardless of ties. RANK is now a reserved keyword and is *not* backward compatible. Please review your scripts to avoid usage of RANK as a relation name.

      Description

      Implement a function that given a (sorted) bag adds to each tuple a unique, increasing identifier without gaps, like what RANK does for SQL.

      This is a candidate project for Google summer of code 2012. More information about the program can be found at https://cwiki.apache.org/confluence/display/PIG/GSoc2012

      Functionality implemented so far, is available at https://reviews.apache.org/r/5523/diff/#index_header

        Attachments

        1. PIG-2353-5.txt
          294 kB
          Allan Avendaño
        2. PIG-2353-4.txt
          286 kB
          Allan Avendaño
        3. PIG-2353-3.txt
          251 kB
          Allan Avendaño
        4. PIG-2353-2
          73 kB
          Allan Avendaño
        5. PIG2353.patch
          9 kB
          Jonathan Coveney

          Issue Links

            Activity

              People

              • Assignee:
                xalan Allan Avendaño
                Reporter:
                azaroth Gianmarco De Francisci Morales
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: