emkornfield commented on a change in pull request #10142:
URL: https://github.com/apache/arrow/pull/10142#discussion_r619876590



##########
File path: go/arrow/flight/flight_test.go
##########
@@ -311,3 +312,65 @@ func TestServer(t *testing.T) {
                t.Fatalf("got %d, want %d", numRows, fi.TotalRecords)
        }
 }
+
+type flightMetadataWriterServer struct{}
+
+func (f *flightMetadataWriterServer) DoGet(tkt *flight.Ticket, fs 
flight.FlightService_DoGetServer) error {
+       recs := arrdata.Records[string(tkt.GetTicket())]
+
+       w := flight.NewRecordWriter(fs, ipc.WithSchema(recs[0].Schema()))
+       defer w.Close()
+       for idx, r := range recs {
+               w.WriteWithAppMetadata(r, []byte(fmt.Sprintf("%d_%s", idx, 
string(tkt.GetTicket()))))

Review comment:
       nit: not sure go convention here.  But in other langauges I find it 
useful to document literal like  parameters (the second parameter in this case 
indicating the second parameter name.
   
   i.e. `/*metadata=*/[]byte(fmt.Sprintf("%d_%s", idx, string(tkt.GetTicket())`




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to