EnricoMi commented on code in PR #43537:
URL: https://github.com/apache/arrow/pull/43537#discussion_r1738314366
##########
python/pyarrow/_flight.pyx:
##########
@@ -746,6 +759,24 @@ cdef class FlightEndpoint(_Weakrefable):
return [Location.wrap(location)
for location in self.endpoint.locations]
+ @property
+ def expiration_time(self):
+ cdef:
+ int64_t time_since_epoch
+ const char* UTC = "UTC"
+ shared_ptr[CTimestampType] time_type =
make_shared[CTimestampType](TimeUnit.TimeUnit_NANO, UTC)
+ shared_ptr[CTimestampScalar] shared
+ if self.endpoint.expiration_time.has_value():
+ time_since_epoch = duration_cast[nanoseconds](
+
self.endpoint.expiration_time.value().time_since_epoch()).count()
Review Comment:
simplified constructor and `def expiration_time`, could removed `chrono.pxd`
with that
--
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]