niebayes opened a new issue, #6562:
URL: https://github.com/apache/arrow-rs/issues/6562

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   Some SQL statements require a schema or even a catalog to be specified for 
successful execution. For example, `SELECT * FROM my_table` might fail on 
certain databases since the context is not fully specified, i.e. on which 
catalog.schema.table the statement is executing.
   
   To provide such context, we use `set_header` on the client side to encode it 
into the request metadata. For instance, our implementation calls 
`flight_sql_client.set_header("database", schema_name)` to specify the schema. 
However, the schema key `database` is determined by the server, and the client 
has no way to retrieve this key dynamically. Worse, if the key changes on the 
server side, client code may break.
   
   I propose adding an interface to `FlightSqlService` that allows the client 
to retrieve the schema or catalog key for encoding context in request metadata. 
This would enhance flexibility for client-server interaction.
   
   **Describe the solution you'd like**
   
   Add a interface to `FlightSqlService`, such as `do_get_schema_key`, that 
allows a client to get the schema key from the server. 
   
   **Describe alternatives you've considered**
   
   Adding a protocol-determined constant `SCHEMA_KEY` may also work but not 
very flexible. 
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


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