You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2017/12/07 15:13:00 UTC

[jira] [Commented] (HIVE-18243) Cartesian error for joins defined in where clause

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

Jesus Camacho Rodriguez commented on HIVE-18243:
------------------------------------------------

[~kgyrtkirk], I might be wrong, but in this specific case this may be expected. Observe that the final plan contains a cartesian product. If this cartesian product is generated by Calcite planning, we will pass through the SemanticAnalyzer after the optimization phase and at that moment it might throw the Exception?

> Cartesian error for joins defined in where clause
> -------------------------------------------------
>
>                 Key: HIVE-18243
>                 URL: https://issues.apache.org/jira/browse/HIVE-18243
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>
> this issue was hidden; because of HIVE-18238
> {code}
> create table agg_01 (amount int, dim_shops_id int);
> create table dim_shops (id int);
> EXPLAIN SELECT agg.amount
> FROM agg_01 agg,
> dim_shops d1
> WHERE agg.dim_shops_id = d1.id
> and agg.dim_shops_id = 1;
> {code}
> emits a cartesian product error
> {code}
> 2017-12-07T04:48:20,612 ERROR [c7a4797b-2635-4e28-9e0b-af2e4d26f2bc main] ql.Driver: FAILED: SemanticException Cartesian products are disabled for safety reasons. If you know what you are doing, please sethive.strict.checks.cartesian.product to false and that hive.mapred.mode is not set to 'strict' to proceed. Note that if you may get errors or incorrect results if you make a mistake while using some of the unsafe features.
> {code}
> from the plan: 
> https://github.com/apache/hive/blob/7ddd915bf82a68c8ab73b0c4ca409f1a6d43d227/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out#L591
> It doesn't seem to be that a cartesian join being happening...possibly the check is overreacting...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)