Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13577

[Python][FlightRPC] pyarrow client do_put close method after write_table did not throw flight error

    XMLWordPrintableJSON

Details

    Description

      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.

        

      //代码占位符
      
      def do_put(self, context, descriptor, reader, writer):
          table = reader.read_all()
          ....
          raise fl.FlightUnavailableError()
          ....
      
      
      
      //代码占位符
      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()
      
      
      

      also, when I throw exception before read_all, the write_table throw OSError.

       

      and i guess,  the FlightStreamWriter   should add write_table and close method, and check_flight_status  according to write_batch had checked. 

      thx.

       

       

      Attachments

        1. image-2021-08-06-17-19-27-413.png
          53 kB
          lixiang li
        2. image-2021-08-06-17-21-12-181.png
          57 kB
          lixiang li

        Issue Links

          Activity

            People

              lixiang.luke lixiang li
              lixiang.luke lixiang li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m