MCPcopy Create free account
hub / github.com/apache/datafusion / server

Function server

datafusion-examples/examples/flight/server.rs:204–215  ·  view source on GitHub ↗

This example shows how to wrap DataFusion with `FlightService` to support looking up schema information for Parquet files and executing SQL queries against them on a remote server. This example is run along-side the example `flight_client`.

()

Source from the content-addressed store, hash-verified

202/// Parquet files and executing SQL queries against them on a remote server.
203/// This example is run along-side the example `flight_client`.
204pub async fn server() -> Result<(), Box<dyn std::error::Error>> {
205 let addr = "0.0.0.0:50051".parse()?;
206 let service = FlightServiceImpl {};
207
208 let svc = FlightServiceServer::new(service);
209
210 println!("Listening on {addr:?}");
211
212 Server::builder().add_service(svc).serve(addr).await?;
213
214 Ok(())
215}

Callers 1

runMethod · 0.85

Calls 2

newFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…