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

RelDecorrelator should build its own mappings, not inherit from SqlToRelConverter

    Details

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

      Description

      In order to get an efficient query to generate possible values of the correlation variable, we need to push filters into joins after sql-to-rel conversion but before decorrelation. But pushing filters messes up the mappings that are created by SqlToRelConverter and used by RelDecorrelator.

      Currently Planner.onCopy is used to inform the planner about changes. But it cannot capture what PushFilterThroughJoinRule is doing.

      I think the correct solution is to build the mappings needed by RelDecorrelator based on the current state of the RelNode tree. And re-build, if necessary, when a rule has fired.

      Another benefit: it would be possible to use RelDecorrelator for queries not

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Close issues resolved in release 0.9.0-incubating (2014-08-25).

        Show
        julianhyde Julian Hyde added a comment - Close issues resolved in release 0.9.0-incubating (2014-08-25).
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/3055cc32 .

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development