lidavidm commented on code in PR #2586:
URL: https://github.com/apache/arrow-rs/pull/2586#discussion_r959753371


##########
arrow-flight/src/lib.rs:
##########
@@ -254,10 +254,17 @@ impl From<SchemaAsIpc<'_>> for FlightData {
     }
 }
 
-impl From<SchemaAsIpc<'_>> for SchemaResult {
-    fn from(schema_ipc: SchemaAsIpc) -> Self {
-        let IpcMessage(vals) = flight_schema_as_flatbuffer(schema_ipc.0, 
schema_ipc.1);
-        SchemaResult { schema: vals }
+impl TryFrom<SchemaAsIpc<'_>> for SchemaResult {
+    type Error = ArrowError;
+
+    fn try_from(schema_ipc: SchemaAsIpc) -> ArrowResult<Self> {

Review Comment:
   We reused the existing IPC format rather than define an entirely separate 
format, which would otherwise have to be kept in sync with format changes; also 
implementations aren't necessarily tied to gRPC/Protobuf (e.g. C++ supporting 
an experimental UCX implementation, though that one still makes use of the 
Protobuf messages).
   
   What is the use case for having a Protobuf-encoded schema?



-- 
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]

Reply via email to