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

Add support for filters in AggregateExpandWithinDistinctRule

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.28.0
    • None

    Description

      Currently, AggregateExpandWithinDistinctRule does not fire if any of the aggregate calls in the aggregate have a filter. We should support filters.

      For example, the following query will not be handled by the current rule due to the FILTER clause:

      SELECT deptno,
          SUM(sal),
          SUM(sal) WITHIN DISTINCT (job) FILTER (WHERE ename LIKE 'A%')
      FROM emp
      GROUP BY deptno
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            wnoble Will Noble
            wnoble Will Noble
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                Slack

                  Issue deployment