Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2785

In EnumerableAggregate, wrong result produced If there are sorted aggregates and non-sorted aggregates at the same time

    XMLWordPrintableJSON

Details

    Description

      SQL:

      WITH tab(X) AS  (values 1, 2, 1)
      SELECT COLLECT(x), COLLECT(x) WITHIN GROUP (ORDER BY 1) FROM tab
      

      Result:

      EXPR$0 |EXPR$1  |
      -------|--------|
             |[1,2,1] |
      

      Correct result:

      EXPR$0 |EXPR$1  |
      -------|--------|
      [1,2,1]|[1,2,1] |
      

      The problem is introduced by CALCITE-2224.

      Attachments

        Issue Links

          Activity

            People

              zhztheplayer Hongze Zhang
              zhztheplayer Hongze Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: