[FlightSQL] Allow implementations of FlightSqlService
to handle custom actions and commands
#4439
Labels
arrow
Changes to the arrow crate
arrow-flight
Changes to the arrow-flight crate
enhancement
Any new improvement worthy of a entry in the changelog
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The current
FlightSqlService
trait allows the implementer to handle custom commands in theDoGet
call viado_get_fallback
method implementation. However, no such possibility is offered forDoPut
,DoAction
andListActions
.A similar case could be made for
DoExchange
.Describe the solution you'd like
Create new methods (with default implementations) in the
FlightSqlService
trait:do_put_fallback
,do_action_fallback
, with equivalent behavior as thedo_get_fallback
method. Furthermore, add a method that enables the implementation of theFlightSqlService
trait to fill in additional actions to the actions returned byListActions
(arrow-rs/arrow-flight/src/sql/server.rs
Lines 608 to 617 in 0bcf200
add_custom_actions
that adds the actions to the existing vector, or alist_custom_actions
that returns a (optional) vector that is appended to the existing vector.Describe alternatives you've considered
The alternative is to create a wrapper
FlightService
implementation that has custom handling, then forwards everything to the existing implementation provided by implementingFlightSqlService
.Additional context
The text was updated successfully, but these errors were encountered: