hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (HIVE-22238) PK/FK selectivity estimation underscales estimations
Date Fri, 01 Nov 2019 05:34:00 GMT


ASF GitHub Bot logged work on HIVE-22238:

                Author: ASF GitHub Bot
            Created on: 01/Nov/19 05:33
            Start Date: 01/Nov/19 05:33
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #831: HIVE-22238 pkfk

 File path: ql/src/test/queries/clientpositive/stat_estimate_drill.q
 @@ -25,4 +28,8 @@ explain analyze select sum(a) from t3 where a=1 group by b;
 explain analyze select sum(a) from t3 where a=1 and b=2 group by b;
 explain analyze select sum(a) from t3 where a=1 and b=2 and c=3 group by b;
+-- FIXME: for the below case; we right now get an IN which is estimated as 1/3 - might worth
consider improving
 Review comment:
   This is kind of surprising... IN clauses are handled in StatsRulesProcFactory, including
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 337192)
    Time Spent: 20m  (was: 10m)

> PK/FK selectivity estimation underscales estimations
> ----------------------------------------------------
>                 Key: HIVE-22238
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Statistics
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22238.01.patch, HIVE-22238.02.patch, HIVE-22238.03.patch, HIVE-22238.04.patch,
HIVE-22238.05.patch, HIVE-22238.05.patch, HIVE-22238.05.patch, HIVE-22238.05.patch, HIVE-22238.05.patch
>          Time Spent: 20m
>  Remaining Estimate: 0h
> at [this point|]
the parent operators rownum is scaled according to pkfkselectivity
> however [pkfkselectivity is computed|]
on a whole subtree.
> Scaling it by that amount will count in estimation already used when parentstats was depending on the number of upstream joins - this may lead to severe underestimations
> what happened was:
> * optimization was able to push the filter to the other side of the join
> * as a result the incoming data was already filtered
> * scaling down by the PK selectiviy - was actually already there...but a new "scaling"

This message was sent by Atlassian Jira

View raw message