MaxGekk commented on issue #25981: [SPARK-28420][SQL] Support the `INTERVAL` 
type in `date_part()`
URL: https://github.com/apache/spark/pull/25981#issuecomment-539573527
 
 
   >> The entire interval's length is returned for EPOCH only, and components 
for other field values.
   
   > Hm, but then back to the original question; why is the answer not 30 below?
   
   @srowen Are you asking about the fractional part? Just in case, the function 
does not return the entire interval length. Look at the example **with the 
`hours` component:**
   ```sql
   spark-sql> SELECT date_part('seconds', interval 5 hours 30 seconds 1 
milliseconds 1 microseconds);
   30.001001
   ```

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


With regards,
Apache Git Services

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

Reply via email to