SEPURI-SAI-KRISHNA commented on PR #59135:
URL: https://github.com/apache/spark/pull/59135#issuecomment-6906841474

   Merged master to resolve the conflicts with SPARK-60929 (the migration guide 
and `QueryExecutionErrors`, keeping both sides).
   
   I also applied the fix from @stevomitric's review of #60134 here, since the 
`date_add` / `date_sub` errors had the same issue: under 
`spark.sql.legacy.timeParserPolicy=LEGACY`, `toSQLValue(_, DateType)` formats 
with the legacy formatter, whose Julian rebase overflows for start dates near 
the minimum `DATE`, so for example `date_add(<minimum DATE>, -1)` failed with a 
raw `java.lang.ArithmeticException: integer overflow` instead of 
`DATETIME_OVERFLOW`. The error now formats the date with a proleptic Gregorian 
formatter (the same private `toSQLDate` helper as in #60134), and a new test 
checks the message under every parser policy.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to