jorisvandenbossche commented on a change in pull request #10054:
URL: https://github.com/apache/arrow/pull/10054#discussion_r615808906



##########
File path: python/pyarrow/io.pxi
##########
@@ -1449,6 +1449,10 @@ cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:
 
 
 cdef NativeFile get_native_file(object source, c_bool use_memory_map):
+    if source is None:

Review comment:
       @amol- another solution could be to add `not None` in places where 
`get_native_file` eventually gets called, to get an error higher up. Eg 
`ParquetReader.open` or `ORCReader.open` could have `object source not None`, 
since those are `def` methods.




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


Reply via email to