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

Merge adjacent union distinct

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment