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

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

So if I do the following:

create temporary view nt1 as select * from values                               
                    
  ("one", 1),                                                                   
                    
  ("two", 2),                                                                   
                    
  ("three", 3)                                                                  
                    
  as nt1(k, v1);                                                                
                    
                                                                                
                    
create temporary view nt2 as select * from values                               
                    
  ("one", 1),                                                                   
                    
  ("two", 22),                                                                  
                    
  ("one", 5)                                                                    
                    
  as nt2(k, v2);

SELECT * FROM nt1, nt2; -- or
select * FROM nt1 inner join nt2;

The SELECT queries do not in fact result in an error. The proposed change would 
have them return an error

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to