Zoltan Haindrich created HIVE-19557: ---------------------------------------
Summary: stats: filters for dates are taking advantage of min/max values Key: HIVE-19557 URL: https://issues.apache.org/jira/browse/HIVE-19557 Project: Hive Issue Type: Bug Components: Query Planning Reporter: Zoltan Haindrich Assignee: Zoltan Haindrich in StatsRulesProcFactory [https://github.com/apache/hive/blob/ab189f54047bbf6beeeaf8d0dcfd5fbe92e465fb/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java#L754|dates are assumed to be an integer]; however this is currently not true - and the resulting exception is handled as a default case... for N/3 {code} set hive.explain.user=true; create table d1(d date); -- tblproperties('transactional'='false'); insert into d1 values ('2010-10-01'), ('2010-10-02'), ('2010-10-03'), ('2010-10-04'), ('2010-10-05'), ('2010-10-06'), ('2010-10-07'), ('2010-10-08'), ('2010-10-09'), ('2010-10-10'); analyze table d1 compute statistics for columns; desc formatted d1; desc formatted d1 d; explain select 'stats: FIL ~0 read',count(1) from d1 where d < '2010-03-01'; explain select 'stats: FIL estimate some read',count(1) from d1 where d < '2010-10-03'; explain select 'stats: FIL estimate all read',count(1) from d1 where d < '2010-11-03'; {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)