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

AggregateUnionTransposeRule produces wrong group sets for the top Aggregate

    XMLWordPrintableJSON

Details

    Description

      Consider the following tree:

      LogicalAggregate[groupSet=$1, ...]
        LogicalUnion
          Input
      

      When the rule is applied, the top-level Aggregate receives the same group set as the original Aggregate, which is wrong because it points to an incorrect attribute.

      LogicalAggregate[groupSet=$1, ...] // <- wrong
        LogicalUnion
          LogicalAggregate[groupSet=$1, ...]
            Input
      

      The correct plan should be:

      LogicalAggregate[groupSet=$0, ...]
        LogicalUnion
          LogicalAggregate[groupSet=$1, ...]
            Input
      

      Attachments

        Issue Links

          Activity

            People

              vozerov Vladimir Ozerov
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1h
                  1h