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

Extend UnionMergeRule to deal with more than 2 branches

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      Current Calcite can only deal with the case when call.rel(2) is a setop and topOp's input size is 2. See L116 in core/src/main/java/org/apache/calcite/rel/rules/UnionMergeRule.java. The test cases introduced in CALCITE-1448 can only deal with 2 levels of unions. When we are trying to apply this rule to Hive, we found its limitation when we have multi-levels (>2) of unions. (e.g. union30.q in Hive test case). This jira is trying to extend that rule to deal with more levels.

        Activity

        Hide
        pxiong Pengcheng Xiong added a comment -

        Julian Hyde or Jesus Camacho Rodriguez, could u take a look? Let me know if you want me to create a PR. ccing Ashutosh Chauhan

        Show
        pxiong Pengcheng Xiong added a comment - Julian Hyde or Jesus Camacho Rodriguez , could u take a look? Let me know if you want me to create a PR. ccing Ashutosh Chauhan
        Hide
        ashutoshc Ashutosh Chauhan added a comment -

        Jesus Camacho Rodriguez We would like to see this get in before 1.13

        Show
        ashutoshc Ashutosh Chauhan added a comment - Jesus Camacho Rodriguez We would like to see this get in before 1.13
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/db95f5b . I also created CALCITE-1852, which I discovered while reviewing the UnionMergeRule.

        Thanks Pengcheng Xiong!

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/db95f5b . I also created CALCITE-1852 , which I discovered while reviewing the UnionMergeRule. Thanks Pengcheng Xiong !
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.13.0 (2017-06-26).

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).

          People

          • Assignee:
            pxiong Pengcheng Xiong
            Reporter:
            pxiong Pengcheng Xiong
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development