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

Variant of SortUnionTransposeRule for order-preserving Union

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None
    1. CALCITE-939.patch
      6 kB
      Maryann Xue
    2. CALCITE-939_2.patch
      6 kB
      Maryann Xue

      Activity

      Hide
      jcamachorodriguez Jesus Camacho Rodriguez added a comment -

      Resolved in release 1.5.0 (2015-11-10)

      Show
      jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.5.0 (2015-11-10)
      Hide
      julianhyde Julian Hyde added a comment -
      Show
      julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/1a491b7f . Thanks for the patch, Maryann Xue !
      Hide
      maryannxue Maryann Xue added a comment -

      Thanks for the comment, Julian Hyde! Does this one look better?

      Show
      maryannxue Maryann Xue added a comment - Thanks for the comment, Julian Hyde ! Does this one look better?
      Hide
      julianhyde Julian Hyde added a comment -

      I think it would really help future users/maintainers if you explain the rationale. Basically, you want `matchNullFetch = true` if you are using an implementation of Union that preserves order. If Union does not preserve order, the limit is doing no useful work. If the Union does preserves order (and merges on the sort key), you are still doing useful work if fetch is null, because at least you have done the sort.

      I can see the concept of "sort-preserving union" being useful in some other rules, so I don't want it buried in an obscure flag.

      Show
      julianhyde Julian Hyde added a comment - I think it would really help future users/maintainers if you explain the rationale. Basically, you want `matchNullFetch = true` if you are using an implementation of Union that preserves order. If Union does not preserve order, the limit is doing no useful work. If the Union does preserves order (and merges on the sort key), you are still doing useful work if fetch is null, because at least you have done the sort. I can see the concept of "sort-preserving union" being useful in some other rules, so I don't want it buried in an obscure flag.

        People

        • Assignee:
          maryannxue Maryann Xue
          Reporter:
          maryannxue Maryann Xue
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development