Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-16220

Dedup RIGHT with keep n>1 returns incorrect results

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Not specified
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Roxie
    • Labels:
      None

      Description

      Dedup using the parameters RIGHT and keep value greater than 1, returns incorrect results. The expected result is that it would return the last n records of each matching. It actually returns the first n-1 matching records and the last record matching record.

      For example, if the input dataset is:

      value1 value2
      KA X
      KA B
      KB A
      KB G
      KC G
      KC Z
      KC C

      And the ECL command is:
      DEDUP(sortedDS, Value1,RIGHT, KEEP 2);

      The current output dataset produced is:

      value1 value2
      KA X
      KA B
      KB A
      KB G
      KC G
      KC C

      The RIGHT keep 2 records are:

      value1 value2
      KC Z
      KC C

      So, the expected result is:

      value1 value2
      KA X
      KA B
      KB A
      KB G
      KC Z
      KC C

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shamser Shamser Ahmed
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: