Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-28488

Merge adjacent union distinct

    XMLWordPrintableJSON

Details

    Description

      Current Hive compiles
      "SELECT * FROM TBL1 UNION SELECT * FROM TBL2 UNION SELECT * FROM TBL3"
      to

      TS - GBY - RS
      TS - GBY - RS - GBY - RS
                 TS - GBY - RS - GBY 

      This can be optimized as follows:

      TS - GBY - RS
      TS - GBY - RS
      TS - GBY - RS - GBY 

      Please check out the attached slides for detailed explanation and feel free to ask any questions or share suggestions. Also, it would be glad if one can share about better location of this optimization (e.g. SemanticAnalyzer, Calcite, etc.).

      Attachments

        1. 1.MergeAdjacentUnionDistinct.pdf
          595 kB
          Seonggon Namgung

        Issue Links

          Activity

            People

              seonggon Seonggon Namgung
              seonggon Seonggon Namgung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: