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

Tweak cost of BindableTableScan to make sure Project is pushed through Aggregate

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: core
    • Labels:
      None

      Description

      Similar to CALCITE-1876.
      Projects are not pushed to BindableTableScan when using ProjectableFilterableTable with aggregate functions.
      The reason is that the cost of BindableTableScan does not use projects (and filters), so the planner chooses a plan with Project node removed by ProjectRemoveRule.
      By tweaking the cost to use the number of used projects solved the problem.
      Any suggestion on the cost formula to take both projects and filters into account?

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: