lidavidm commented on code in PR #43537:
URL: https://github.com/apache/arrow/pull/43537#discussion_r1764321234


##########
python/pyarrow/_flight.pyx:
##########
@@ -736,16 +742,48 @@ cdef class FlightEndpoint(_Weakrefable):
                     CLocation.Parse(tobytes(location)).Value(&c_location))
             self.endpoint.locations.push_back(c_location)
 
+        if expiration_time is not None:
+            self.endpoint.expiration_time = 
TimePoint_to_system_time(TimePoint_from_ns(
+                expiration_time.cast(timestamp("ns")).value))
+
+        self.endpoint.app_metadata = tobytes(app_metadata)

Review Comment:
   sorry, does this handle None appropriately? (The docstring states 'optional')



##########
python/pyarrow/_flight.pyx:
##########
@@ -736,16 +742,48 @@ cdef class FlightEndpoint(_Weakrefable):
                     CLocation.Parse(tobytes(location)).Value(&c_location))
             self.endpoint.locations.push_back(c_location)
 
+        if expiration_time is not None:
+            self.endpoint.expiration_time = 
TimePoint_to_system_time(TimePoint_from_ns(
+                expiration_time.cast(timestamp("ns")).value))
+
+        self.endpoint.app_metadata = tobytes(app_metadata)
+
     @property
     def ticket(self):
         """Get the ticket in this endpoint."""
         return Ticket(self.endpoint.ticket.ticket)
 
     @property
     def locations(self):
+        """Get locations where this flight is available."""
         return [Location.wrap(location)
                 for location in self.endpoint.locations]
 
+    @property
+    def expiration_time(self):
+        """Get the Expiration time of this stream.

Review Comment:
   ```suggestion
           """Get the expiration time of this stream.
   ```



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

Reply via email to