HyukjinKwon opened a new pull request #35887:
URL: https://github.com/apache/spark/pull/35887


   ### What changes were proposed in this pull request?
   
   This PR is a followup of 
https://github.com/apache/spark/commit/fab4ceb157baac870f6d50b942084bb9b2cd4ad2 
that mistakenly removed the numeric type support in `to_timestamp(...)`. This 
PR restores the behavior back.
   
   ### Why are the changes needed?
   
   To keep the previous behavior.
   
   ### Does this PR introduce _any_ user-facing change?
   
   To end users, no because the change has not been released yet.
   
   ### How was this patch tested?
   
   Unit test was added, and manually tested:
   
   ```scala
   spark.range(1).selectExpr("to_timestamp(id)").show()
   ```
   
   **Before**
   
   ```
   +----------------+
   |to_timestamp(id)|
   +----------------+
   |            null|
   +----------------+
   ```
   
   
   **After**
   
   ```
   +-------------------+
   |   to_timestamp(id)|
   +-------------------+
   |1970-01-01 09:00:00|
   +-------------------+
   
   ```
   


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