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 2016/11/15 17:55:58 UTC

[jira] [Comment Edited] (HIVE-15209) Set hive.strict.checks.cartesian.product to false by default

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

Jesus Camacho Rodriguez edited comment on HIVE-15209 at 11/15/16 5:55 PM:
--------------------------------------------------------------------------

[~xuefuz], obviously it does, because if this is set to true, queries with cartesian product throw an error.

{code:sql}
SELECT * FROM
mytable src1 JOIN mytable src2;
{code}
{quote}
org.apache.hadoop.hive.ql.parse.SemanticException: Cartesian products are disabled for safety reasons. If you know what you are doing, please make sure that hive.strict.checks.cartesian.product is set to false and that hive.mapred.mode is not set to 'strict' to enable them.
{quote}

I do not not know if this property was actually ever changed, but IMO it makes sense to set it by default to _false_ and if a user wants to have more control over his query workload, then we can enable it.


was (Author: jcamachorodriguez):
[~xuefuz], obviously it does, because if this is set to true, queries with cartesian product throw an error.

{code:sql}
SELECT * FROM
mytable src1 JOIN mytable src2;
{code}
{quote}
org.apache.hadoop.hive.ql.parse.SemanticException: Cartesian products are disabled for safety reasons. If you know what you are doing, please make sure that hive.strict.checks.cartesian.product is set to false and that hive.mapred.mode is not set to 'strict' to enable them.
{quote}

I do not not know if this property was actually ever changed, but IMO it makes sense to set it by default to _false_ and if a user wants to have more control over his query workload, that we enables it on demand.

> Set hive.strict.checks.cartesian.product to false by default
> ------------------------------------------------------------
>
>                 Key: HIVE-15209
>                 URL: https://issues.apache.org/jira/browse/HIVE-15209
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-15209.patch
>
>
> If we aim to make Hive compliant with SQL, w should disable this property by default, as expressing a cartesian product, though inefficient, is perfectly valid in SQL.
> Further, if we express complex predicates in the ON clause of a SQL query, we might not be able to push these predicates to the join operator; however, we should still be able to execute the query.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)