[ 
https://issues.apache.org/jira/browse/ARROW-14783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17479617#comment-17479617
 ] 

Ian Alexander Joiner commented on ARROW-14783:
----------------------------------------------

def test_bytesio_readwrite():
    from pyarrow import orc
    from io import BytesIO
 
    bytesio = BytesIO()
    a = pa.array([1, None, 3, None])
    b = pa.array([None, "Arrow", None, "ORC"])
    table = pa.table(\{"int64": a, "utf8": b})
    orc.write_table(table, bytesio)
    orc_file = orc.ORCFile(bytesio.getvalue())
    output_table = orc_file.read()
    assert table.equals(output_table)

This test results in an error since bytesio is closed.

> [Python] io.BytesIO support for the ORC writer
> ----------------------------------------------
>
>                 Key: ARROW-14783
>                 URL: https://issues.apache.org/jira/browse/ARROW-14783
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Ian Alexander Joiner
>            Assignee: Ian Alexander Joiner
>            Priority: Minor
>              Labels: orc
>             Fix For: 8.0.0
>
>
> Currently the ORC writer doesn't support io.BytesIO. We need to figure out 
> why that's the case and provide the needed support.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to