0
点赞
收藏
分享

微信扫一扫

学习记录-报错-2

RockYoungTalk 2022-03-22 阅读 47
sparkscala

Exception in thread "main" org.apache.spark.SparkUpgradeException: You may get a different result due to the upgrading of Spark 3.0: Fail to recognize 'YYYY-MM-dd' pattern in the DateTimeFormatter. 1) You can set spark.sql.legacy.timeParserPolicy to LEGACY to restore the behavior before Spark 3.0. 2)

将SparkSession 定义成下面的样子即可

val spark = SparkSession
.builder()
.appName("top-three")
.master("local[2]")
.config("spark.sql.legacy.timeParserPolicy", "LEGACY")
.getOrCreate()
举报

相关推荐

0 条评论