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

Push aggregate with aggregate functions through join

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      AggregateJoinTransposeRule currently only fires if the Aggregate has no aggregate functions. We need to lift that limitation.

      Aggregate functions should be split, e.g. COUNT becomes SUM of COUNT. Some aggregate functions cannot be split, e.g. distinct-count.

      Add a new interface to SqlAggFunction to allow it to declare the split policy.

        Issue Links

          Activity

          Hide
          jnadeau Jacques Nadeau added a comment -

          Resolved in release 1.4.0-incubating (2015-08-23)

          Show
          jnadeau Jacques Nadeau added a comment - Resolved in release 1.4.0-incubating (2015-08-23)
          Hide
          julianhyde Julian Hyde added a comment - - edited

          Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/cf7a7a97.

          In this iteration, it is not safe to use the extended rule (that can handle aggregate functions) in the Volcano planner, only in the Hep planner. The extended rule requires metadata that can handle cyclic relational expressions (to be fixed in CALCITE-794).

          Show
          julianhyde Julian Hyde added a comment - - edited Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/cf7a7a97 . In this iteration, it is not safe to use the extended rule (that can handle aggregate functions) in the Volcano planner, only in the Hep planner. The extended rule requires metadata that can handle cyclic relational expressions (to be fixed in CALCITE-794 ).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development