我想将我的时间戳四舍五入到当天。按照这个答案。但我收到一个错误。
Select date_format(timestamp, '%Y-%m-%d') as day
错误:
org.apache.hive.service.cli.HiveSQLException: Error running query: org.apache.spark.SparkException: Job aborted due to stage failure: Task 82 in stage 9847.0 failed 4 times, most recent failure: Lost task 82.3 in stage 9847.0 (TID 225269) (10.139.66.255 executor 2): org.apache.spark.SparkUpgradeException: You may get a different result due to the upgrading of Spark 3.0: Fail to recognize '%Y-%m-%d' pattern in the DateTimeFormatter. 1) You can set legacy_time_parser_policy to LEGACY to restore the behavior before Spark 3.0. 2) You can form a valid datetime pattern with the guide from https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html
at 0x44ede16 <photon>.ColExprFromProtoImpl(external/workspace_spark_3_2/photon/exprs/date-format-expr.h:92)