alamb commented on issue #5016:
URL: 
https://github.com/apache/arrow-datafusion/issues/5016#issuecomment-1410719781

   > But for the potential arrow_cast function, we will return Expression as 
well with Arrow datatype inside, how it differs from usual cast?
   
   It differs because normal casting `CAST(x as target_type)` or 
`x::target_type` can only cast to SQL types (not Arrow types). DataFusion has a 
mapping from SQL Type --> Arrow type but there are Arrow types without any 
corresponding SQL type. 
   
   
   >  Perhaps you have the analogue in PG? I went through 
https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-cast/ but 
didn't find anything similar
   
   I don't think there is any analog in postgres; The difference is that you 
can refer to all types in postgres directly using SQL. Since posgres types are 
sql types there is no analog to this ticket's proposal in SQL
   
   


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

Reply via email to