hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-17465) Statistics: Drill-down filters don't reduce row-counts progressively
Date Sun, 17 Sep 2017 23:45:02 GMT

     [ https://issues.apache.org/jira/browse/HIVE-17465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vineet Garg updated HIVE-17465:
-------------------------------
    Attachment: HIVE-17465.7.patch

> Statistics: Drill-down filters don't reduce row-counts progressively
> --------------------------------------------------------------------
>
>                 Key: HIVE-17465
>                 URL: https://issues.apache.org/jira/browse/HIVE-17465
>             Project: Hive
>          Issue Type: Bug
>          Components: Physical Optimizer, Statistics
>            Reporter: Gopal V
>            Assignee: Vineet Garg
>         Attachments: HIVE-17465.1.patch, HIVE-17465.2.patch, HIVE-17465.3.patch, HIVE-17465.4.patch,
HIVE-17465.5.patch, HIVE-17465.6.patch, HIVE-17465.7.patch
>
>
> {code}
> explain select count(d_date_sk) from date_dim where d_year=2001 ;
> explain select count(d_date_sk) from date_dim where d_year=2001  and d_moy = 9;
> explain select count(d_date_sk) from date_dim where d_year=2001 and d_moy = 9 and d_dom
= 21;
> {code}
> All 3 queries end up with the same row-count estimates after the filter.
> {code}
>             Map Operator Tree:
>                 TableScan
>                   alias: date_dim
>                   filterExpr: (d_year = 2001) (type: boolean)
>                   Statistics: Num rows: 73049 Data size: 82034027 Basic stats: COMPLETE
Column stats: COMPLETE
>                   Filter Operator
>                     predicate: (d_year = 2001) (type: boolean)
>                     Statistics: Num rows: 363 Data size: 4356 Basic stats: COMPLETE Column
stats: COMPLETE
>  
>         Map 1 
>             Map Operator Tree:
>                 TableScan
>                   alias: date_dim
>                   filterExpr: ((d_year = 2001) and (d_moy = 9)) (type: boolean)
>                   Statistics: Num rows: 73049 Data size: 82034027 Basic stats: COMPLETE
Column stats: COMPLETE
>                   Filter Operator
>                     predicate: ((d_year = 2001) and (d_moy = 9)) (type: boolean)
>                     Statistics: Num rows: 363 Data size: 5808 Basic stats: COMPLETE Column
stats: COMPLETE
>         Map 1 
>             Map Operator Tree:
>                 TableScan
>                   alias: date_dim
>                   filterExpr: ((d_year = 2001) and (d_moy = 9) and (d_dom = 21)) (type:
boolean)
>                   Statistics: Num rows: 73049 Data size: 82034027 Basic stats: COMPLETE
Column stats: COMPLETE
>                   Filter Operator
>                     predicate: ((d_year = 2001) and (d_moy = 9) and (d_dom = 21)) (type:
boolean)
>                     Statistics: Num rows: 363 Data size: 7260 Basic stats: COMPLETE Column
stats: COMPLETE
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message