tustvold commented on code in PR #2309:
URL: https://github.com/apache/arrow-rs/pull/2309#discussion_r937526567
##########
arrow-flight/src/sql/server.rs:
##########
@@ -66,76 +67,87 @@ pub trait FlightSqlService:
&self,
query: CommandStatementQuery,
request: FlightDescriptor,
+ metadata: MetadataMap,
Review Comment:
I wonder if it might be better to modify `request` to be
`Request<FlightDescriptor>`. Not only would this provide access to the metadata
map, but also things like
[extensions](https://docs.rs/tonic/latest/tonic/struct.Request.html#method.extensions).
I think it would also avoid a clone
In particular extensions are a common way to allow middleware to extract
data from the headers, and make it easily accessible to downstreams. As an
example in IOx, we use a middleware to extract tracing information from
requests -
https://github.com/influxdata/influxdb_iox/blob/main/trace_http/src/tower.rs
--
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]