Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-482 Implement SQL and planner hints
  3. CALCITE-3649

Hints should be propagated correctly in planner rules if original node is transformed to different kind

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.21.0
    • Fix Version/s: 1.22.0
    • Component/s: core

      Description

      If the AGG was transformed to PROJECT + AGG, the hints of AGG should be propagated to the AGG node.

      In current implementation, the hints would lost.

      The perfect solution is to identify the replaced sub-tree, and for this tree, we should check which node is the right one to attach hints. But for this patch, we only consider the new transformed node with pattern of PROJECT + "node of same kind of original", this solves most of the cases.

      In current implementation, we try to match the first node of new relational expression sub-tree. The first node satisfies if it:

      • Does not have any existing hints on it
      • Can apply the original hints

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danny0405 Danny Chen
                Reporter:
                danny0405 Danny Chen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 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 - 2.5h
                  2.5h