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

Srinath commented on SPARK-17298:
---------------------------------

You are correct that with this change, queries of the form
{noformat}
select * from A inner join B
{noformat}
will now throw an error where previously they would not. 
The reason for this suggestion is that users may often forget to specify join 
conditions altogether, leading to incorrect, long-running queries. Requiring 
explicit cross joins helps clarify intent.

Turning on the spark.sql.crossJoin.enabled flag will revert to previous 
behavior.

> Require explicit CROSS join for cartesian products
> --------------------------------------------------
>
>                 Key: SPARK-17298
>                 URL: https://issues.apache.org/jira/browse/SPARK-17298
>             Project: Spark
>          Issue Type: Story
>          Components: SQL
>            Reporter: Srinath
>            Priority: Minor
>
> Require the use of CROSS join syntax in SQL (and a new crossJoin DataFrame 
> API) to specify explicit cartesian products between relations.
> By cartesian product we mean a join between relations R and S where there is 
> no join condition involving columns from both R and S.
> If a cartesian product is detected in the absence of an explicit CROSS join, 
> an error must be thrown. Turning on the spark.sql.crossJoin.enabled 
> configuration flag will disable this check and allow cartesian products 
> without an explicit cross join.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to