You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/09 15:21:52 UTC

[GitHub] [spark] srowen commented on issue #25981: [SPARK-28420][SQL] Support the `INTERVAL` type in `date_part()`

srowen commented on issue #25981: [SPARK-28420][SQL] Support the `INTERVAL` type in `date_part()`
URL: https://github.com/apache/spark/pull/25981#issuecomment-540050753
 
 
   I'm not distinguishing double vs decimal here, and yes in the second instance my point was just that it's an integral type not a real type - integer vs byte wasn't the point there.
   
   I think this is the heart of the difference, so wanted to ask about it. Why is seconds and smaller handled differently? for larger time units, it always returns an integral type, meaning it intends to only ever return full minutes, hours, etc. As the type is `byte`, clearly it only ever intends to return the minute, hour part, etc. It can't return the whole interval in minutes (too large) nor all the smaller parts of the interval in minutes (e.g. 5.5 minutes).
   
   However seconds works differently, as it very much is trying to return the seconds + ms + us in seconds. So it returns a real type. But why is it different?
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org