[
https://issues.apache.org/jira/browse/ARROW-13577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Li resolved ARROW-13577.
------------------------------
Fix Version/s: 6.0.0
Resolution: Fixed
Issue resolved by pull request 10893
[https://github.com/apache/arrow/pull/10893]
> [Python][FlightRPC] pyarrow client do_put close method after write_table did
> not throw flight error
> ---------------------------------------------------------------------------------------------------
>
> Key: ARROW-13577
> URL: https://issues.apache.org/jira/browse/ARROW-13577
> Project: Apache Arrow
> Issue Type: Improvement
> Components: FlightRPC, Python
> Reporter: lixiang li
> Assignee: lixiang li
> Priority: Major
> Labels: pull-request-available
> Fix For: 6.0.0
>
> Attachments: image-2021-08-06-17-19-27-413.png,
> image-2021-08-06-17-21-12-181.png
>
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> hi, when I implentend flight server to do_put data, and throw exceptions
> proactively, and client will get OSError when close writer, but I expect
> FlightError.
> !image-2021-08-06-17-19-27-413.png|width=1017,height=146!
> {code:java}
> //代码占位符
> def do_put(self, context, descriptor, reader, writer):
> table = reader.read_all()
> ....
> raise fl.FlightUnavailableError()
> ....
> {code}
> {code:java}
> //代码占位符
> df = ...
> table = pa.Table.from_pandas(df)
> client = fl.connect('...')
> writer, _ = client.do_put(descriptor, table.schema, options=options)
> writer.write_table(table)
> write.close()
> {code}
> also, when I throw exception before read_all, the write_table throw OSError.
> !image-2021-08-06-17-21-12-181.png|width=1275,height=150!
>
> and i guess, the FlightStreamWriter should add write_table and close
> method, and check_flight_status according to write_batch had checked.
> thx.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)