CROSS JOIN problem solving Spark SQL appear

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/yanjiangdi/article/details/98951640

CROSS JOIN problem solving Spark SQL appear

 

1, show problems as follows:

    Use the CROSS JOIN syntax to allow cartesian products between these relation

    

2 reasons:

     Spark 2.x version default does not support Cartesian product operation

 

3. Solution:

     Spark.sql.crossJoin.enabled opening parameter, as follows:

    spark.conf.set("spark.sql.crossJoin.enabled", "true")

 

Guess you like

Origin blog.csdn.net/yanjiangdi/article/details/98951640