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


   > It feels to me like to_timestamp is doing two steps. First, it is 
converting to a string to a Timestamp (respecting the offset in the string, if 
any). Second, it is "reinterpret" casting (schema only change) that timestamp 
to the desired local/instant semantics. 
   
   Yes I agree that is what it is doing. 
   
   > I'd personally prefer something that breaks things into two steps if 
needed.
   
   Theoretically I agree that a two step process is clearest; The challenge is 
that the output type of `to_timestamp` needs to be known in advance (aka 
planning time) prior to access to the values of the strings. 
   
   Imagine a query that is like `to_timestamp(string_column)` that needs to 
produce an array that has uniform type. What type is chosen? Assuming the 
second argument must be a string constant (aka would not allow 
`to_timestamp(timestamp_column, timezone_column)` the output type can be known 
with the proposal in 
https://github.com/apache/arrow-datafusion/issues/686#issuecomment-884461987)
   


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