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

CBO: Expand the multiple count distinct with a group-by key

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

      create temporary table mytable1 (x integer, y integer, z integer, a integer);
      
      explain cbo
      select z, x, count(distinct y), count(distinct a)
      from mytable1
      group by z, x;
      
      
      explain cbo
      select count(distinct y), count(distinct a)
      from mytable1
      

      The first is not vectorized, the second one is because of the grouping-set based rewrite for count distinct.

      Attachments

        1. HIVE-22448.01.patch
          67 kB
          jcamachorodriguez
        2. HIVE-22448.02.patch
          77 kB
          jcamachorodriguez
        3. HIVE-22448.02.patch
          77 kB
          jcamachorodriguez
        4. HIVE-22448.patch
          13 kB
          jcamachorodriguez

        Activity

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

          People

            jcamacho Jesús Camacho Rodríguez Assign to me
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

              Slack

                Issue deployment