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

Distinct aggregate flag in window function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.13.0
    • core
    • None

    Description

      When parsing queries such as
      SELECT B1, SUM(DISTINCT B2) OVER (ORDER BY B4 RANGE BETWEEN INTERVAL '10' SECOND PRECEDING AND CURRENT ROW) FROM T

      The aggregates in the LogicalWindow do not have any marker of being distinct.
      isDistinct() flag is not set. Probably some rule(s) silently swallow the DISTINCT keyword

      The LogicalWindow object that result is

      LogicalWindow(window#0=[window(partition {} order by [2] range between $3 PRECEDING and CURRENT ROW aggs [COUNT($1), $SUM0($1)])])

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              rtudoran radu
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: