You're absolutely correct and not missing anything, this is definitely an 
opportunity to make the flight record reader a bit more useful. I like the idea 
of the getLatestMetadata that you mentioned is on the java side. Can you file a 
JIRA issue for this? Given that I'm doing a lot of updates to the Go library 
already (and I'm the one who wrote the flight client/server for Go) I can see 
about adding that functionality.

--Matt

-----Original Message-----
From: Paul Whalen <pgwha...@gmail.com> 
Sent: Wednesday, April 21, 2021 12:44 PM
To: dev@arrow.apache.org
Subject: [Go] Flight client app metadata access

Hi all,

I'm using the Go Flight client, working off of this example:
https://urldefense.com/v3/__https://github.com/apache/arrow/blob/master/go/arrow/flight/flight_test.go__;!!PBKjc0U4!an-4cxncu8LAtExIU1-l-ckt5GrUyLBo39gJpdZwITpDu7jhoxUXufwl9IfIt4k$
 

I've found that there isn't a very convenient way to access the app metadata 
from a Flight stream, because the ipc.Reader you get from calling
flight.NewRecordReader() only exposes the array.Record as you read data from 
it.  This makes sense to me because only Flight defines the App Metadata 
concept, not the Arrow IPC format on its own.  I've been able to work around it 
by dropping down a level, and building an alternate flight.dataMessageReader 
but this seems subpar.

Am I missing something?  Or is there an opportunity to make the result of
flight.NewRecordReader() a bit more useful such that it includes the app 
metadata?  Perhaps a type more specific to Flight, not just IPC in general.  On 
the Java side I see that FlightStream has getLatestMetadata() which seems like 
a pattern worth following.

Thanks,
Paul

Reply via email to