srielau commented on PR #47186:
URL: https://github.com/apache/spark/pull/47186#issuecomment-2213069069

   > I'm also reluctant like @yaooqinn 's comment.
   > 
   > Could you summarize the status of other DBMS in the PR description first 
for further discussion?
   
   As noted above SparkSQL would the first (that I know of) to introduce a 
shorthand for try_cast.
   try_cast() is supported at least by MS SQL Server, IBM Db2 , Snowflake, 
duckDB, NOT PostgreSQL, NOT mySQL, it is NOT ANSI SQL.
   SparkSQL introduced try_cast to compensate for non-ANSI CASTing.
   
   `::` is supported at least by PostgreSQL, Snowflake, Informix, Db2, duckDB 
(It's hard to search the docs for "::"). It is also NOT ANSI
   
   Personally I prefer `::` over CAST since it it so more dense to type and 
casts are frequently needed.
   
   For that reason I think try_cast deserves a shorthand (which may or may not 
be `:::`) as well, I would not be surprised if duckDB copied Spark SQL if we 
lead the way in a sensible and obvious fashion.
   
   


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