You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Aman Sinha (Jira)" <ji...@apache.org> on 2020/11/18 07:05:00 UTC

[jira] [Commented] (IMPALA-10313) When inverting joins stats should be recomputed

    [ https://issues.apache.org/jira/browse/IMPALA-10313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17234312#comment-17234312 ] 

Aman Sinha commented on IMPALA-10313:
-------------------------------------

bq. So when inverting a join we can simple just swap 
I think you meant 'we cannot simply' .

> When inverting joins stats should be recomputed
> -----------------------------------------------
>
>                 Key: IMPALA-10313
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10313
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>            Reporter: Shant Hovsepian
>            Assignee: Shant Hovsepian
>            Priority: Major
>             Fix For: Impala 4.0
>
>
> When searching a the cheapest join plan, a join may be inverted, this is safe for certain join operators. While join equality is symmetric, foreign key and primary key constraints are a directed relationship and therefore not always symmetric. So when inverting a join we can simple just swap the cost and cardinality for the left and right children as a change in order would affect any estimated fk/pk cardinality.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org