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

Hive stats optimizer wrongly uses stats against non native tables

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

      Stats of non native tables are inaccurate, thus queries over non native tables can not optimized by stats optimizer.
      Take example of query

      Explain select count(*) from (select `__time` from druid_test_table limit 1) as src ;
      

      the plan will be reduced to

      POSTHOOK: query: explain extended select count(*) from (select `__time` from druid_test_table limit 1) as src
      POSTHOOK: type: QUERY
      STAGE DEPENDENCIES:
        Stage-0 is a root stage
      STAGE PLANS:
        Stage: Stage-0
          Fetch Operator
            limit: 1
            Processor Tree:
              ListSink
      

      Attachments

        1. HIVE-19684.patch
          4 kB
          Slim Bouguerra
        2. HIVE-19684.2.patch
          13 kB
          Slim Bouguerra
        3. HIVE-19684.3.patch
          15 kB
          Slim Bouguerra

        Activity

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

          People

            bslim Slim Bouguerra Assign to me
            bslim Slim Bouguerra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment