cloud-fan commented on pull request #32001:
URL: https://github.com/apache/spark/pull/32001#issuecomment-810782597


   > this conversion could be safe
   
   It's not about safe or not. It's about how to make the behavior easy to 
understand for end-users.
   
   CAST is a standard SQL operator, and I don't think it makes sense that 
casting integral value to day-time value should treat the input as 
microseconds, simply because in Spark the precision is microseconds. This 
behavior should not be vendor-specific.
   
   Ideally the data source should have native support of interval type to store 
them. If it does not, we can provide some new functions to convert between 
int/long and year-month/day-time interval, similar to these timestamp 
functions. We can also do some research and see how other databases handle this 
case.


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



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

Reply via email to