0x26res commented on issue #1900:
URL: 
https://github.com/apache/iceberg-python/issues/1900#issuecomment-2807570132

   I guess in python a `datetime.timedelta` (aka duration) is like a 
`datetime.time`, except a timedelta value can be negative and be greater than a 
day. 
   
   In pyarrow, there isn't this constraint. You can create a `time64` that 
represent more than 24 hours or that is negative. In that respect duration and 
time64, in pyarrow, are both an int 64, which associated with its unit ("us", 
"ns"...) can be interpreted to a logical type.
   
   The spec on the `time` in iceberg are a bit loose:
   
   > Time of day, microsecond precision, without date, timezone
   
   I guess we can either:
   - have the library convert `pa.duration64` to an iceberg `time` by default
   - force the user to convert their `pa.duration('us')` to `pa.time64('us')` 
before hand, if their happy to interpret their duration as time.
   - add support for an explicit `duration` type in iceberg.
   
    


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to