You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2021/09/14 09:16:00 UTC

[jira] [Updated] (ARROW-13735) [Python] Creating a Map array with non-default field names segfaults

     [ https://issues.apache.org/jira/browse/ARROW-13735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joris Van den Bossche updated ARROW-13735:
------------------------------------------
    Fix Version/s:     (was: 5.0.1)

> [Python] Creating a Map array with non-default field names segfaults
> --------------------------------------------------------------------
>
>                 Key: ARROW-13735
>                 URL: https://issues.apache.org/jira/browse/ARROW-13735
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Joris Van den Bossche
>            Priority: Major
>             Fix For: 6.0.0
>
>
> With ARROW-13696, you can create a MapType with non-default field names (the default being "key" and "value"). 
> However, when then trying to create an array with it from python tuples, it crashes:
> {code:python}
> >>> t = pa.map_(pa.field("name", "string", nullable=False), "int64")
> >>> pa.array([[('a', 1), ('b', 2)], [('c', 3)]], type=t)
> ../src/arrow/array/array_nested.cc:192:  Check failed: self->list_type_->value_type()->Equals(data->child_data[0]->type) 
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xf0b882)[0x7f298d497882]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xf0b800)[0x7f298d497800]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xf0b822)[0x7f298d497822]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow4util8ArrowLogD1Ev+0x47)[0x7f298d497b81]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xb39d31)[0x7f298d0c5d31]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow8MapArray7SetDataERKSt10shared_ptrINS_9ArrayDataEE+0x198)[0x7f298d0c06be]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow8MapArrayC1ERKSt10shared_ptrINS_9ArrayDataEE+0x64)[0x7f298d0bed14]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN9__gnu_cxx13new_allocatorIN5arrow8MapArrayEE9constructIS2_JRKSt10shared_ptrINS1_9ArrayDataEEEEEvPT_DpOT0_+0x49)[0x7f298d1a0f13]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZNSt16allocator_traitsISaIN5arrow8MapArrayEEE9constructIS1_JRKSt10shared_ptrINS0_9ArrayDataEEEEEvRS2_PT_DpOT0_+0x38)[0x7f298d19ebe6]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZNSt23_Sp_counted_ptr_inplaceIN5arrow8MapArrayESaIS1_ELN9__gnu_cxx12_Lock_policyE2EEC1IJRKSt10shared_ptrINS0_9ArrayDataEEEEES2_DpOT_+0xaf)[0x7f298d19b547]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5arrow8MapArrayESaIS5_EJRKSt10shared_ptrINS4_9ArrayDataEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_+0xb2)[0x7f298d195a64]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZNSt12__shared_ptrIN5arrow8MapArrayELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRKSt10shared_ptrINS0_9ArrayDataEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_+0x4c)[0x7f298d1918bc]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZNSt10shared_ptrIN5arrow8MapArrayEEC1ISaIS1_EJRKS_INS0_9ArrayDataEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_+0x39)[0x7f298d18f617]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZSt15allocate_sharedIN5arrow8MapArrayESaIS1_EJRKSt10shared_ptrINS0_9ArrayDataEEEES3_IT_ERKT0_DpOT1_+0x38)[0x7f298d18d254]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZSt11make_sharedIN5arrow8MapArrayEJRKSt10shared_ptrINS0_9ArrayDataEEEES2_IT_EDpOT0_+0x54)[0x7f298d1897b7]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xbf5d6a)[0x7f298d181d6a]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(+0xbef0f3)[0x7f298d17b0f3]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow9MakeArrayERKSt10shared_ptrINS_9ArrayDataEE+0x99)[0x7f298d173f6b]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow12ArrayBuilder6FinishEPSt10shared_ptrINS_5ArrayEE+0x115)[0x7f298d0e4ed9]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow.so.600(_ZN5arrow12ArrayBuilder6FinishEv+0x47)[0x7f298d0e4fb7]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow_python.so.600(+0x28cc91)[0x7f29d05d2c91]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow_python.so.600(+0x292774)[0x7f29d05d8774]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow_python.so.600(+0x28ca00)[0x7f29d05d2a00]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow_python.so.600(+0x288f63)[0x7f29d05cef63]
> /home/joris/miniconda3/envs/arrow-dev/lib/libarrow_python.so.600(_ZN5arrow2py17ConvertPySequenceEP7_objectS2_NS0_19PyConversionOptionsEPNS_10MemoryPoolE+0xa9d)[0x7f29d05cadb7]
> /home/joris/scipy/repos/arrow/python/pyarrow/lib.cpython-38-x86_64-linux-gnu.so(+0x1c890d)[0x7f29d08f190d]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyCFunction_Call+0x54)[0x5581d331a814]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyObject_MakeTpCall+0x31e)[0x5581d332988e]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x5683)[0x5581d33c1bb3]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyEval_EvalCodeEx+0x39)[0x5581d33a0b79]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyEval_EvalCode+0x1b)[0x5581d3442c0b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x2724be)[0x5581d34614be]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x12875b)[0x5581d331775b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x92f)[0x5581d33bce5f]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x183c23)[0x5581d3372c23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x1d3b)[0x5581d33be26b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x183c23)[0x5581d3372c23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x1d3b)[0x5581d33be26b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x183c23)[0x5581d3372c23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x196089)[0x5581d3385089]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0xa4b)[0x5581d33bcf7b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x1a7)[0x5581d33a0d27]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x92f)[0x5581d33bce5f]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x1a7)[0x5581d33a0d27]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0xa4b)[0x5581d33bcf7b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x1b2637)[0x5581d33a1637]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x1789)[0x5581d33bdcb9]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x379)[0x5581d33a0ef9]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0xa4b)[0x5581d33bcf7b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x379)[0x5581d33a0ef9]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0xa4b)[0x5581d33bcf7b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x1a7)[0x5581d33a0d27]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0xa4b)[0x5581d33bcf7b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x379)[0x5581d33a0ef9]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x1b25c1)[0x5581d33a15c1]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyObject_Call+0x5e)[0x5581d3313ace]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x21c0)[0x5581d33be6f0]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyFunction_Vectorcall+0x379)[0x5581d33a0ef9]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalFrameDefault+0x92f)[0x5581d33bce5f]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(_PyEval_EvalCodeWithName+0x2c3)[0x5581d339fb23]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyEval_EvalCodeEx+0x39)[0x5581d33a0b79]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyEval_EvalCode+0x1b)[0x5581d3442c0b]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x253ca3)[0x5581d3442ca3]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x26d8f3)[0x5581d345c8f3]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyRun_FileExFlags+0x97)[0x5581d34618a7]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(PyRun_SimpleFileExFlags+0x19c)[0x5581d3461a7c]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(Py_RunMain+0x36d)[0x5581d3461ffd]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(Py_BytesMain+0x39)[0x5581d34621b9]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f29d5c6f0b3]
> /home/joris/miniconda3/envs/arrow-dev/bin/python(+0x1e6d19)[0x5581d33d5d19]
> Aborted (core dumped)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)