hive on spark报错

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的第一句

Error in query: cannot resolve '`tl.rgs_exp_dt`' given input columns:[];line 137 pos 9;
解决:sql脚本问题,本次是因为order by字段没在group by里,出现这种问题是因为提示行附近的sql字段名没有定义准确