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


##########
python/pyarrow/_flight.pyx:
##########
@@ -855,10 +888,14 @@ cdef class FlightInfo(_Weakrefable):
             the descriptor for this flight.
         endpoints : list of FlightEndpoint
             a list of endpoints where this flight is available.
-        total_records : int
-            the total records in this flight, or -1 if unknown
-        total_bytes : int
-            the total bytes in this flight, or -1 if unknown
+        total_records : int optional, default -1
+            the total records in this flight, or -1 if unknown.
+        total_bytes : int optional, default -1
+            the total bytes in this flight, or -1 if unknown.

Review Comment:
   The underlying structure does not admit a null value. It is Protobuf, there 
are no true null values (*this has changed slightly in recent versions but we 
do not use that codegen option for this structure). 
   
   Let's be clear here, though. Is this for input, or output? I would be -1 to 
ever returning `None` for this attribute. If it's merely to accept it as an 
input on construction that might be OK, but it would be misleading to people 
when it doesn't round trip.



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to