spark中join有两种,一种是RDD的join,一种是sql中的join,分别来看: 1 RDD join org.apache.spark.rdd.PairRDDFunctions /** * Return an RDD containing all pairs of elements with matching keys in `this` and `other`. Each * pair of elements will be returned as a (k, (v1, v2)) t
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"