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

createProject in RelOptUtil should uniquify field names

    Details

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

      Description

      The method

       
      public static RelNode createProject(
            final RelFactories.ProjectFactory factory,
            final RelNode child, final List<Integer> posList)
      

      in RelOptUtil should uniquify fields before creating the Project operator. Otherwise, we might end up hitting an assertion in the Project constructor. This behavior was observed using the AggregateProjectMergeRule rule.

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment -

          Which version of Calcite did you see this? AggregateProjectMergeRule now uses RelBuilder.project, which I believe makes field names unique.

          Show
          julianhyde Julian Hyde added a comment - Which version of Calcite did you see this? AggregateProjectMergeRule now uses RelBuilder.project, which I believe makes field names unique.
          Hide
          julianhyde Julian Hyde added a comment -

          +1 to commit the patch

          Can you change the commit description to "createProject in RelOptUtil should uniquify field names".

          Show
          julianhyde Julian Hyde added a comment - +1 to commit the patch Can you change the commit description to "createProject in RelOptUtil should uniquify field names".
          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Julian Hyde, it was based on 1.4, the version currently used by Hive.

          Once we upgrade to 1.5, we won't even call that createProject method. However I will commit this fix, as I think it makes sense to uniquify those field names.

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Julian Hyde , it was based on 1.4, the version currently used by Hive. Once we upgrade to 1.5, we won't even call that createProject method. However I will commit this fix, as I think it makes sense to uniquify those field names.
          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Thanks Julian Hyde for reviewing it. Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/13f6efd .
          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Resolved in release 1.5.0 (2015-11-10)

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.5.0 (2015-11-10)

            People

            • Assignee:
              jcamachorodriguez Jesus Camacho Rodriguez
              Reporter:
              jcamachorodriguez Jesus Camacho Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development