beliefer opened a new pull request #33665:
URL: https://github.com/apache/spark/pull/33665


   ### What changes were proposed in this pull request?
   With ANSI mode, `SELECT make_timestamp(1, 1, 1, 1, 1, 1)` fails, because the 
'seconds' parameter needs to be of type DECIMAL(8,6), and INT can't be 
implicitly casted to DECIMAL(8,6) under ANSI mode.
   
   ```
   org.apache.spark.sql.AnalysisException
   cannot resolve 'make_timestamp(1, 1, 1, 1, 1, 1)' due to data type mismatch: 
argument 6 requires decimal(8,6) type, however, '1' is of int type.; line 1 pos 
7
   ```
   
   We should update the function `make_timestamp` to allow integer type 
'seconds' parameter.
   
   
   ### Why are the changes needed?
   Make `make_timestamp` could accepts integer as 'seconds' parameter.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'Yes'.
   `make_timestamp` could accepts integer as 'seconds' parameter.
   
   
   ### How was this patch tested?
   New tests.
   


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