liukun4515 commented on issue #2445:
URL: https://github.com/apache/arrow-rs/issues/2445#issuecomment-1223629434

   > ```go
   > package main
   > 
   > import (
   >     "fmt"
   >     "github.com/apache/arrow/go/arrow"
   >     "github.com/apache/arrow/go/arrow/flight"
   >     "github.com/apache/arrow/go/arrow/memory"
   > )
   > 
   > func main() {
   >      schema := arrow.NewSchema(
   >            []arrow.Field{
   >                    {Name: "tid", Type: arrow.PrimitiveTypes.Int32},
   >                    {Name: "timestamp", Type: 
arrow.FixedWidthTypes.Timestamp_ms},
   >                    {Name: "value", Type: arrow.PrimitiveTypes.Float32},
   >            },
   >            nil,
   >    )
   >     serialized_schema := 
flight.SerializeSchema(schema,memory.DefaultAllocator)
   >     fmt.Println(serialized_schema)
   > }
   > ```
   > 
   > **255 255 255 255 248 0 0 0** 16 0 0 0 0 0 10 0 12 0 10 0 9 0 4 0 10 0 0 0 
16 0 0 0 0 1 4 0 8 0 8 0 0 0 4 0 8 0 0 0 4 0 0 0 3 0 0 0 148 0 0 0 60 0 0 0 4 0 
0 0 136 255 255 255 16 0 0 0 24 0 0 0 0 0 0 3 24 0 0 0 0 0 0 0 0 0 6 0 8 0 6 0 
6 0 0 0 0 0 1 0 5 0 0 0 118 97 108 117 101 0 0 0 188 255 255 255 16 0 0 0 24 0 
0 0 0 0 0 10 36 0 0 0 0 0 0 0 8 0 12 0 10 0 4 0 8 0 0 0 8 0 0 0 0 0 1 0 3 0 0 0 
85 84 67 0 9 0 0 0 116 105 109 101 115 116 97 109 112 0 0 0 16 0 20 0 16 0 0 0 
15 0 8 0 0 0 4 0 16 0 0 0 16 0 0 0 24 0 0 0 0 0 0 2 28 0 0 0 0 0 0 0 8 0 12 0 8 
0 7 0 8 0 0 0 0 0 0 1 32 0 0 0 3 0 0 0 116 105 100 0 255 255 255 255 0 0 0 0
   
   The api you called in the rust and go are not the same.
   In the go 
https://pkg.go.dev/github.com/apache/arrow/go/v10/arrow/flight#SerializeSchema, 
it will convert the schema to flight data. 
   
   But in the rust `SchemaAsIpc.into()` just get the `SchemaResult`
   
   


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