alamb commented on issue #6672:
URL: https://github.com/apache/arrow-rs/issues/6672#issuecomment-2455607489
How about creating a FlightDataEncoder to encode an empty stream and then
read the schema off the stream
```rust
let empty_stream = FlightDataEncoderBuilder::new()
.with_schema(pre_encoded_schema)
.build(streams::iter(vec![]));
let schema = empty_stream.schema();
```
If that works, perhaps we can add an example to the documentation
I would be hesitant to just make `prepare_schema_for_flight` public as it
seems somewhat brittle as the arguments need to remain in sync with however the
`FlightDataEncoder` is constructed, but it uses different types
> I have seen but not followed closely work to create logical types separate
from physical types. Possibly there is room for flight_info requests to report
logical schemas and for the server to use any valid physical encoding of the
data. This however requires much more coordination between clients and servers.
Additionally its not clear that flight_info requests should actually deal in
logical instead of physical schemas.
FWIW the logical type idea will likely remain in DataFusion as there is no
concept of LogicalType in the Arrow type system (for better / worse)
--
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]