You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "stevomitric (via GitHub)" <gi...@apache.org> on 2024/12/25 14:26:29 UTC

[PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #49291: [SPARK-50669][SQL] Change the signature of TimestampAdd expression
URL: https://github.com/apache/spark/pull/49291


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

Posted by "stevomitric (via GitHub)" <gi...@apache.org>.
stevomitric commented on PR #49291:
URL: https://github.com/apache/spark/pull/49291#issuecomment-2563116364

   Tests passed. cc @cloud-fan 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

Posted by "stevomitric (via GitHub)" <gi...@apache.org>.
stevomitric commented on PR #49291:
URL: https://github.com/apache/spark/pull/49291#issuecomment-2562428083

   > Some tests need to be updated.
   
   Updated golden files & scalastyle.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on PR #49291:
URL: https://github.com/apache/spark/pull/49291#issuecomment-2562265159

   Some tests need to be updated.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-50669][SQL] Change the signature of TimestampAdd expression [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #49291:
URL: https://github.com/apache/spark/pull/49291#issuecomment-2563214769

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org