faq-spark3.x时间格式问题

问题描述/异常栈
2023-07-28 17:25:28 CST ApplicationMaster ERROR - User class threw exception: org.apache.spark.sql.AnalysisException: cannot resolve '(PARTITION BY b.finished_goods_code ORDER BY a.tisfc549_tcdt ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND INTERVAL '1 years' FOLLOWING)' due to data type mismatch: The data type 'date' used in the order specification does not match the data type 'interval' which is used in the range frame.; line 1 pos 345;
发现版本
spark3.1
解决方案
1、升级spark3.3
2、date类型转换成Timestamp类型
问题原因
https://issues.apache.org/jira/browse/SPARK-35110

作者:林帅