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

Estimate stats gives out incorrect number of columns during query planning when using predicates like c=22

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • None
    • Hive
    • None
    • Hive 3

    Description

      Table type: External
      Stats: No stats collected.

      When filter operator appeared in the plan and the row estimates went bad. Changed the original query on table and modifying the filter predicate form.

       

      predicate form optimised as  filter Op rows out estimate quality
      prd_i_tmp.type = '22' predicate:(type = '22') Filter Operator [FIL_12] (rows=5 width=3707) |bad
      prd_i_tmp.type in ('22') predicate:(type = '22') Filter Operator [FIL_12] (rows=5 width=3707) bad
      prd_i_tmp.type < '23' and prd_i_tmp.type > '21' predicate(type < '23') and (type > '21')) Filter Operator [FIL_12] (rows=8706269 width=3707)  good
      prd_i_tmp.type like '22' predicate:(type like '22') Filter Operator [FIL_12] (rows=39178213 width=3707) best
      prd_i_tmp.type in ('22','AA','BB') predicate:(type) IN ('22', 'AA', 'BB') Filter Operator [FIL_12] (rows=15 width=3707) bad
      prd_i_tmp.type rlike '22' predicate:type regexp '22'  Filter Operator [FIL_12] (rows=39178213 width=3707) good

      Attachments

        Issue Links

          Activity

            People

              ashish-kumar-sharma Ashish Sharma
              ssubhas Sindhu Subhas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: