stevomitric opened a new pull request, #49291:
URL: https://github.com/apache/spark/pull/49291

   ### What changes were proposed in this pull request?
   In this PR the signature of `TimestampAdd` function was changed from 
`IntegerType` to `LongType` for quantity parameter.
   
   
   ### Why are the changes needed?
   To allow long types to be passed to timestamp_add function. Currently 
passing anything larger then `Int32.MaxValue` will cause a cast overflow 
exception. There is no need to restrict this method to only in32 values.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, the following query passes:
   ```sql
   select
     timestampadd(
       millisecond,
       1733011227403,
       timestamp '1970-01-01T00:00:00.000Z'
     )
   ```
   Above query now returns `2024-12-01T00:00:27.000+00:00` instead of throwing 
a cast exception.
   
   
   ### How was this patch tested?
   New tests in this PR.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
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