samuel7james opened a new pull request, #2982:
URL: https://github.com/apache/datafusion-ballista/pull/2982

   # Which issue does this PR close?
   
   Closes #2963.
   
   # Rationale for this change
   
   Dictionary-encoded columns came back decoded, so the client's batches didn't 
match the plan's schema. The executor's `FetchPartition` handler built its 
Flight encoder with the default `DictionaryHandling::Hydrate`, and the client's 
`FlightDataStream` couldn't read dictionary messages anyway: it never filled 
`dictionaries_by_id`. A shuffle read over Flight also broke the stage after it, 
which got `Utf8` where its plan expected a dictionary and panicked in the 
shuffle writer.
   
   # What changes are included in this PR?
   
   - `flight_service.rs`: both `FetchPartition` paths use 
`DictionaryHandling::Resend`, as the pipelined path already does.
   - `client.rs`: `FlightDataStream` decodes with `arrow_flight`'s 
`FlightRecordBatchStream`, which reads dictionary batches. Errors map to the 
same `DataFusionError::ArrowError` as before.
   - New `client/tests/dictionary.rs`: a projection and a `GROUP BY` over a 
dictionary column, with both planners and with local and remote Flight shuffle 
reads. It checks every batch's types against `DataFrame::schema()`.
   
   All 8 cases fail on `main` and pass with this change. `cargo test` for 
ballista-core, ballista-executor and ballista, `cargo clippy --all-targets -- 
-D warnings` and `cargo fmt --check` pass.
   
   # Are there any user-facing changes?
   
   Dictionary columns now keep their type in query results. There is no API or 
proto change.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to