beliefer opened a new pull request #25963: [SPARK-28137][SQL] Add Postgresql 
function to_number.
URL: https://github.com/apache/spark/pull/25963
 
 
   ### What changes were proposed in this pull request?
   `Postgresql` and `Oracle` have the function `to_number` to convert a string 
to number. 
   The implement and support syntax has many different between `Postgresql` and 
`Oracle`. So, this PR mainly follows the implement of `to_number` in 
`Postgresql`.
   
   This PR references the doc 
https://www.postgresql.org/docs/12/functions-formatting.html
   Oracle doc is 
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/TO_NUMBER.html#GUID-D4807212-AFD7-48A7-9AED-BEC3E8809866
   
   The syntax like:
   > select to_number('12,454.8-', '99G999D9S');
   -12454.8
   
   ### Why are the changes needed?
   This PR adds a new function.
   
   
   ### Does this PR introduce any user-facing change?
   No.
   
   
   ### How was this patch tested?
   New UT.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to