[
https://issues.apache.org/jira/browse/HIVE-20292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vineet Garg updated HIVE-20292:
-------------------------------
Resolution: Fixed
Fix Version/s: 4.0.0
Status: Resolved (was: Patch Available)
Pushed this to master. Thanks for looking at it [~ashutoshc]. I have createdÂ
HIVE-20320 to turn on sq_count_check optimization by default.
> Bad join ordering in tpcds query93 with primary constraint defined
> ------------------------------------------------------------------
>
> Key: HIVE-20292
> URL: https://issues.apache.org/jira/browse/HIVE-20292
> Project: Hive
> Issue Type: Improvement
> Components: Query Planning
> Reporter: Vineet Garg
> Assignee: Vineet Garg
> Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-20292.1.patch, HIVE-20292.2.patch,
> HIVE-20292.3.patch, HIVE-20292.4.patch, HIVE-20292.5.patch,
> HIVE-20292.6.patch, HIVE-20292.7.patch
>
>
> Query 93 has join (including outer) b/w store_sales, store_return and reason.
> Without constraints store_return is joined with reason and then with
> store_sales.
> But if a primary key is added on store_return (alter table store_returns add
> constraint tpcds_pk_sr primary key (sr_item_sk, sr_ticket_number) disable
> novalidate rely) join order becomes ((store_sales, store_return), reason)
> which is very inefficient.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)