aiguofer opened a new issue, #37635: URL: https://github.com/apache/arrow/issues/37635
### Describe the enhancement requested We'd like to be able to expose custom metadata related to a given query through our Arrow Flight SQL service. For example, it'd be great to expose `queryId`, `queryCost`, or `queryType`, which could be useful to clients/users. It seems like the existing ability to add [custom metadata](https://arrow.apache.org/docs/format/Columnar.html#custom-application-metadata) could be leveraged to accomplish this, but the exact mechanics seem a little unclear. The easiest thing would be to expose it via the `Schema` metadata since every `FlightInfo` already includes one, making it easy to expose through existing implementations. However, this seems a little hacky conceptually since the metadata could be associated with the query and not the results themselves (although metadata for the results also makes sense). Another option could be to add a way to expose custom metadata directly through `FlightInfo`, but this would likely require major changes in every language implementation. As far as how this gets exposed on the client side, we'd likely need changes to the JDBC and ADBC drivers. For JDBC, there could be a few methods: - `PreparedStatement.getCustomMetadata()` - `ResultSet.getCustomMetadata()` - `ResultSetMetaData.getCustomMetadata()` Thoughts? ### Component(s) FlightRPC -- 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]
