raulcd opened a new pull request, #47410:
URL: https://github.com/apache/arrow/pull/47410

   ### Rationale for this change
   
   The Flight Server DoExchange method currently does not support Dictionary 
replacement or Dictionary Deltas, similar to how the client currently behaves 
or how we do for DoGet we can use an `ipc::RecordBatchWriter` with a custom 
`IpcPayloadWriter` to do not reimplement Dictionary Replacement / Deltas logic.
   
   ### What changes are included in this PR?
   
   Remove manually generating ipc Payloads by calling the individual payload 
calls to use an `ipc::RecordBatchWriter` and a custom  
`TransportMessagePayloadWriter` to modify the `IpcPayloads` into 
`FlightPayloads`.
   
   ### Are these changes tested?
   
   Yes, existing tests cover the DoExchange functionality and new test for 
Python has been added where Dictionary deltas are being send via DoExchange. 
The test was failing before this change because the dictionary wasn't updated:
   ```python
               received_table = reader.read_all()
               expected_table = simple_dicts_table()
   >           assert received_table.equals(expected_table)
   E           assert False
   E            +  where False = equals(pyarrow.Table\nsome_dicts: 
dictionary<values=string, indices=int64, ordered=0>\n----\nsome_dicts: [  -- 
dictionary:\n["foo... -- dictionary:\n["foo","baz","quux"]  -- indices:\n[2,1], 
 -- dictionary:\n["foo","baz","quux","new"]  -- indices:\n[0,3]])
   E            +    where equals = pyarrow.Table\nsome_dicts: 
dictionary<values=string, indices=int64, ordered=0>\n----\nsome_dicts: [  -- 
dictionary:\n["foo...ull],  -- dictionary:\n["foo","baz","quux"]  -- 
indices:\n[2,1],  -- dictionary:\n["foo","baz","quux"]  -- 
indices:\n[0,3]].equals
   
   pyarrow/tests/test_flight.py:2596: AssertionError
   
==================================================================================
 short test summary info 
===================================================================================
   FAILED 
pyarrow/tests/test_flight.py::test_flight_dictionary_deltas_do_exchange - 
assert False
   
   ```
   
   ### Are there any user-facing changes?
   
   No, only that the expected dictionary replacement/deltas will work for 
DoExchange.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to