Spark SQL中出現 CROSS JOIN 問題解決
1、問題顯示如下所示:
Use the CROSS JOIN syntax to allow cartesian products between these relation
2、原因:
Spark 2.x版本中預設不支援笛卡爾積操作
3、解決方案:
通過參數spark.sql.crossJoin.enabled開啟,方式如下:
spark.conf.set("spark.sql.crossJoin.enabled", "true")
A man must be on his own!