Sindhu Subhas created HIVE-25985:
------------------------------------

             Summary: Estimate stats gives out incorrect number of columns when 
using predicates like c=22
                 Key: HIVE-25985
                 URL: https://issues.apache.org/jira/browse/HIVE-25985
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 3.0.0
         Environment: Hive 3
            Reporter: Sindhu Subhas


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|



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to