hive on spark报错

发布时间 2023-04-28 17:54:46作者: 凯文-高处不胜寒

Error in query: Detected implicit cartesian product for LEFT OUTER join between logical plans
Union

Join condition is missing or trivial.
Either: use the CROSS JOIN syntax to allow cartesian products between these
relations, or: enable implicit cartesian products by setting the configuration
variable spark.sql.crossJoin.enabled=true;

解决:脚本是否有必要笛卡尔,如果确实需要的话设置:set spark.sql.crossJoin.enabled=true; --开启笛卡尔积,放在sql的第一句