Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/14132
Oh, thank you, @cloud-fan . For current Hive, it is ignored. The followings
have the same plans.
- SELECT * FROM (SELECT * FROM t1) x, t1;
- SELECT /*+ MAPJOIN(t1) */ * FROM (SELECT * FROM t1) x, t1;
- SELECT /*+ MAPJOIN(t1) */ * FROM (SELECT * FROM t1) x, t2;
- SELECT /*+ MAPJOIN(t2) */ * FROM (SELECT * FROM t1) x, t2;
```sql
hive> set hive.auto.convert.join=false;
hive> EXPLAIN SELECT * FROM (SELECT * FROM t1) x, t1;
Warning: Shuffle Join JOIN[7][tables = [$hdt$_0, $hdt$_1]] in Stage
'Stage-1:MAPRED' is a cross product
OK
Explain
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Map Reduce
Map Operator Tree:
hive> EXPLAIN SELECT /*+ MAPJOIN(t1) */ * FROM (SELECT * FROM t1) x, t1;
Warning: Shuffle Join JOIN[5][tables = [x, t1]] in Stage 'Stage-1:MAPRED'
is a cross product
OK
Explain
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Map Reduce
Map Operator Tree:
hive> EXPLAIN SELECT /*+ MAPJOIN(t1) */ * FROM (SELECT * FROM t1) x, t2;
Warning: Shuffle Join JOIN[5][tables = [x, t2]] in Stage 'Stage-1:MAPRED'
is a cross product
OK
Explain
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Map Reduce
Map Operator Tree:
hive> EXPLAIN SELECT /*+ MAPJOIN(t2) */ * FROM (SELECT * FROM t1) x, t2;
Warning: Shuffle Join JOIN[5][tables = [x, t2]] in Stage 'Stage-1:MAPRED'
is a cross product
OK
Explain
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 depends on stages: Stage-1
STAGE PLANS:
Stage: Stage-1
Map Reduce
Map Operator Tree:
```
In fact, HIVE-3784 (https://issues.apache.org/jira/browse/HIVE-3784) was
January 2013.
Here is the git commit
https://github.com/apache/hive/commit/3dca21456a34b6db9cf03e755fae8ecdfaef1730 .
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]