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

Limit with ORDER BY producing wrong results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2.0
    • 0.4.0
    • None
    • None

    Description

      Query:

      A = load 'studenttab10k' as (name, age, gpa);
      B = group A by name;
      C = foreach B generate group, SUM(A.gpa) as rev;
      D = order C by rev;
      E = limit D 10;
      dump E;

      Output:

      (alice king,31.7)
      (alice laertes,26.450000000000003)
      (alice thompson,25.869999999999997)
      (alice van buren,23.59)
      (bob allen,19.900000000000002)
      (bob ichabod,29.0)
      (bob king,28.459999999999994)
      (bob miller,10.28)
      (bob underhill,28.139999999999997)
      (bob van buren,25.990000000000002)

      Attachments

        1. PIG-797.patch
          5 kB
          Daniel Dai
        2. PIG-797-2.patch
          9 kB
          Daniel Dai
        3. PIG-797-3.patch
          8 kB
          Daniel Dai

        Activity

          People

            daijy Daniel Dai
            olgan Olga Natkovich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: