[
https://issues.apache.org/jira/browse/HIVE-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Amareshwari Sriramadasu reopened HIVE-3652:
-------------------------------------------
When I ran the same query on the latest trunk with HIVE-3784 fixed, I see the
following :
{noformat}
explain select /*+ MAPJOIN(b,c) */ * from fact a join dim1 b on a.k1=b.k1 JOIN
dim2 c on a.k2=c.k2;
FAILED: SemanticException [Error 10227]: Not all clauses are supported with
mapjoin hint. Please remove mapjoin hint.
{noformat}
When I set hive.auto.convert.join=true; and run the following :
{noformat}
explain select * from fact a join dim1 b on a.k1=b.k1 JOIN dim2 c on a.k2=c.k2;
STAGE DEPENDENCIES:
Stage-10 is a root stage , consists of Stage-13, Stage-14, Stage-1
Stage-13 has a backup stage: Stage-1
Stage-8 depends on stages: Stage-13
Stage-7 depends on stages: Stage-1, Stage-8, Stage-9 , consists of Stage-11,
Stage-12, Stage-2
Stage-11 has a backup stage: Stage-2
Stage-5 depends on stages: Stage-11
Stage-12 has a backup stage: Stage-2
Stage-6 depends on stages: Stage-12
Stage-2
Stage-14 has a backup stage: Stage-1
Stage-9 depends on stages: Stage-14
Stage-1
Stage-0 is a root stage
{noformat}
And the above query launches two MR jobs. Correct me if i am doing anything
wrong.
Namit, Can you confirm if this is fixed in HIVE-3784 and is there any other way
to run this?
Vikram, If you are seeing this fixed, can you please add tests if no code
changes are required?
> Join optimization for star schema
> ---------------------------------
>
> Key: HIVE-3652
> URL: https://issues.apache.org/jira/browse/HIVE-3652
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Reporter: Amareshwari Sriramadasu
> Assignee: Vikram Dixit K
> Fix For: 0.11.0
>
>
> Currently, if we join one fact table with multiple dimension tables, it
> results in multiple mapreduce jobs for each join with dimension table,
> because join would be on different keys for each dimension.
> Usually all the dimension tables will be small and can fit into memory and so
> map-side join can used to join with fact table.
> In this issue I want to look at optimizing such query to generate single
> mapreduce job sothat mapper loads dimension tables into memory and joins with
> fact table on different keys as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira