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

Micah Kornfield resolved ARROW-8640.
------------------------------------
    Resolution: Not A Problem

> pyarrow.UnionArray.from_buffers() expected number of buffers (1) did not 
> match the passed number (3)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-8640
>                 URL: https://issues.apache.org/jira/browse/ARROW-8640
>             Project: Apache Arrow
>          Issue Type: Bug
>            Reporter: Anish Biswas
>            Priority: Major
>
> {code:python}
> arr1 = pa.array([1,2,3,4,5])arr1.buffers()
> arr2 = pa.array([1.1,2.2,3.3,4.4,5.5])
> types = pa.array([0, 1, 0, 0, 1, 1, 0], type='int8')
> value_offsets = pa.array([1, 0, 0, 2, 1, 2, 3], 
> type='int32')value_offsets.buffers()
> arr = pa.UnionArray.from_dense(types, value_offsets,                          
>                 [arr1, arr2])
> arr4 = pa.UnionArray.from_buffers(pa.struct([pa.field("0", arr1.type) , 
> pa.field("1", arr2.type)]), 5, arr.buffers()[0:3], children=[arr1, arr2])
> {code}
> The problem here arises when I try to produce the Union Array via buffers, 
> according to the Columnar Documentation I need 3 buffers to produce a dense 
> Union Array. But when I try this, there is the error `Type's expected number 
> of buffers (1) did not match the passed number (3)`. 



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

Reply via email to