raulcd commented on issue #45056: URL: https://github.com/apache/arrow/issues/45056#issuecomment-3200810933
`DoExchange` doesn't seem to be using the same code path as the returned table is not allowing for dictionary replacement nor dictionary deltas. Test reproducer: ```python def test_flight_dictionary_deltas_do_exchange(): class DeltaFlightServer(ConstantFlightServer): def do_exchange(self, context, descriptor, reader, writer): if descriptor.command == b'dict_deltas': table = simple_dicts_table() options = pa.ipc.IpcWriteOptions(emit_dictionary_deltas=True) writer.begin(table.schema, options=options) writer.write_table(table) with DeltaFlightServer() as server, \ FlightClient(('localhost', server.port)) as client: descriptor = flight.FlightDescriptor.for_command(b"dict_deltas") writer, reader = client.do_exchange(descriptor, options=flight.FlightCallOptions( write_options=pa.ipc.IpcWriteOptions(emit_dictionary_deltas=True) ) ) received_table = reader.read_all() expected_table = simple_dicts_table() assert received_table.equals(expected_table) ``` The received table did not update the dictionary (neither deltas / or dictionary replacement) ``` (Pdb) received_table pyarrow.Table some_dicts: dictionary<values=string, indices=int64, ordered=0> ---- some_dicts: [ -- dictionary: ["foo","baz","quux"] -- indices: [1,0,null], -- dictionary: ["foo","baz","quux"] -- indices: [2,1], -- dictionary: ["foo","baz","quux"] -- indices: [0,3]] (Pdb) expected_table pyarrow.Table some_dicts: dictionary<values=string, indices=int64, ordered=0> ---- some_dicts: [ -- dictionary: ["foo","baz","quux"] -- indices: [1,0,null], -- dictionary: ["foo","baz","quux"] -- indices: [2,1], -- dictionary: ["foo","baz","quux","new"] -- indices: [0,3]] ``` -- 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