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

Trait conversion broken for RelTraits other than Convention

    Details

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

      Description

      RelTraits (e.g. RelCollationTrait and RelDistributionTrait) fail to convert in calcite core. Convention is handled specially at the root node (with VolcanoPlanner.ensureRootConverters()), but this assumes that convention conversions are not necessary underneath the root, which may not necessarily be true. In order for RelTrait conversions to work, there is a need to have converters (via AbstractConverters which use RelTraitDef.convert()).

      In a previous commit (b312031), AbstractConverters were added too aggressively. For example, even if RelTraitDef.canConvert() returns false, AbstractConverters were superfluously added. As a result, many plans would take a lot longer to plan (as pointed by 3b55c35). But removing the AbstractConverters means that RelTrait conversions are not handled properly in calcite.

        Activity

        Hide
        minjikim MinJi Kim added a comment -

        I have a fix for the problem, and created a pull request.

        https://github.com/apache/calcite/pull/210

        Show
        minjikim MinJi Kim added a comment - I have a fix for the problem, and created a pull request. https://github.com/apache/calcite/pull/210
        Hide
        julianhyde Julian Hyde added a comment -
        Show
        julianhyde Julian Hyde added a comment - Cc Maryann Xue .
        Hide
        julianhyde Julian Hyde added a comment -
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/a3bc0d8e . MinJi Kim , thanks for the PR!
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.9.0 (2016-09-22)

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.9.0 (2016-09-22)

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development