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

Star table wrongly assigned to materialized view

    Details

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

      Description

      cc: Rajat Venkatesh

      CalciteMaterializer tries to rewrite query relnode with the star table in schema (the first one that fits). Utility function used is RelOptMaterialization::tryUseStar. Utility function should return null when it cannot rewrite relnode using star table, but instead it is returning the same relnode back. This is causing MV being assigned star table even when it is not required.

        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 -
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/d38e6b1b . Thanks for the patch!
        Hide
        amargoor Amogh Margoor added a comment -

        Hi Julian Hyde

        PR is raised for this which contains fix and the reproducer: https://github.com/apache/incubator-calcite/pull/103
        Please take a look.

        Regards,
        Amogh

        Show
        amargoor Amogh Margoor added a comment - Hi Julian Hyde PR is raised for this which contains fix and the reproducer: https://github.com/apache/incubator-calcite/pull/103 Please take a look. Regards, Amogh

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development