jorisvandenbossche commented on issue #34906:
URL: https://github.com/apache/arrow/issues/34906#issuecomment-1507625595
Thanks! Backtrace for this:
```
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__pyx_pf_7pyarrow_3lib_17RecordBatchReader_6schema___get__
(__pyx_v_self=0x7ffff7509e00) at
/home/joris/scipy/repos/arrow/python/build/temp.linux-x86_64-cpython-310/lib.cpp:181731
181731 __pyx_v_c_schema =
__pyx_v_self->reader.get()->schema();
#0 __pyx_pf_7pyarrow_3lib_17RecordBatchReader_6schema___get__
(__pyx_v_self=0x7ffff7509e00) at
/home/joris/scipy/repos/arrow/python/build/temp.linux-x86_64-cpython-310/lib.cpp:181731
#1 0x00007ffff711d698 in
__pyx_pw_7pyarrow_3lib_17RecordBatchReader_6schema_1__get__
(__pyx_v_self=<pyarrow.lib.RecordBatchReader at remote 0x7ffff7509e00>)
at
/home/joris/scipy/repos/arrow/python/build/temp.linux-x86_64-cpython-310/lib.cpp:181682
#2 0x00007ffff71416b5 in
__pyx_getprop_7pyarrow_3lib_17RecordBatchReader_schema
(o=<pyarrow.lib.RecordBatchReader at remote 0x7ffff7509e00>, x=0x0)
at
/home/joris/scipy/repos/arrow/python/build/temp.linux-x86_64-cpython-310/lib.cpp:206992
#3 0x00005555556982b3 in _PyObject_GenericGetAttrWithDict (obj=<optimized
out>, name='schema', dict=<optimized out>, suppress=0) at
/usr/local/src/conda/python-3.10.6/Objects/object.c:1253
```
Now, the docstring of `RecordBatchReader` also indicates that it shouldn't
be called directly ("Do not call this class's constructor directly, use one of
the ``RecordBatchReader.from_*`` functions instead."). But we don't actually
"forbid" doing that, like we do for other of our classes (eg pa.Array()
errors).
I am not sure there is a usecase of `RecordBatchReader()`, so maybe we
should already disallow this step (I suppose the segfault comes from accessing
the schema on a nullptr reader).
--
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]