Open KevinyhZou opened 1 week ago
In query select to_date('2025-07-22 10:00:00', 'yyyy-MM-dd')
, it transform to get_timestamp
function to parse date.
when spark.sql.legacy.timeParserPolicy
set to legacy
,
yyyy-MM-dd
) length is less than the length of yyyy-MM-dd HH:mm:ss
, it should parse the substring of the input string according to the format length;yyyy-MM-dd HH:mm:ss.S
) length is greater than the length of yyyy-MM-dd HH:mm:ss
, it shoud always to parse the timestamp as the micorseond's the precision set to 3
.if spark.sql.legacy.timeParserPolicy
set to corrected
, then parse the date time as the input format.
Backend
CH (ClickHouse)
Bug description
sql query
in valina spark, when set
spark.sql.legacy.timeParserPolicy
value aslegacy
, it returns '2025-07-22'; when set valuecorrected
it returns value NULLin gluten,it always returns '2025-07-22'
Spark version
Spark-3.3.x
Spark configurations
No response
System information
No response
Relevant logs
No response