pub trait RequestForwarder:
Send
+ Sync
+ 'static {
// Required method
fn execute_forwarded(
&self,
req: ForwardRequest,
) -> impl Future<Output = ForwardResponse> + Send;
}Expand description
Trait for executing forwarded SQL queries on the local Data Plane.
Implemented by the main binary crate using SharedState + QueryContext.
The cluster RPC handler calls this when it receives a ForwardRequest.
Required Methods§
Sourcefn execute_forwarded(
&self,
req: ForwardRequest,
) -> impl Future<Output = ForwardResponse> + Send
fn execute_forwarded( &self, req: ForwardRequest, ) -> impl Future<Output = ForwardResponse> + Send
Execute a forwarded SQL query locally and return the result.
The implementation should:
- Create a synthetic identity from the tenant_id (trusted node-to-node)
- Plan the SQL through DataFusion
- Dispatch to the local Data Plane
- Collect response payloads
- Return them in a ForwardResponse
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.