lixiang li created ARROW-13577:
----------------------------------

             Summary: [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
         Attachments: image-2021-08-06-17-19-27-413.png, 
image-2021-08-06-17-21-12-181.png

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)

Reply via email to