Skip to content

Commit

Permalink
Update Flight proto: PollFlightInfo & expiration time (#5413)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefffrey authored Feb 22, 2024
1 parent e09896d commit e7ce4bb
Show file tree
Hide file tree
Showing 17 changed files with 1,026 additions and 54 deletions.
4 changes: 3 additions & 1 deletion arrow-flight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ bytes = { version = "1", default-features = false }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
once_cell = { version = "1", optional = true }
paste = { version = "1.0" }
prost = { version = "0.12.1", default-features = false, features = ["prost-derive"] }
prost = { version = "0.12.3", default-features = false, features = ["prost-derive"] }
# For Timestamp type
prost-types = { version = "0.12.3", default-features = false }
tokio = { version = "1.0", default-features = false, features = ["macros", "rt", "rt-multi-thread"] }
tonic = { version = "0.11.0", default-features = false, features = ["transport", "codegen", "prost"] }

Expand Down
2 changes: 2 additions & 0 deletions arrow-flight/examples/flight_sql_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ impl FlightSqlService for FlightSqlServiceImpl {
let endpoint = FlightEndpoint {
ticket: Some(ticket),
location: vec![loc],
expiration_time: None,
app_metadata: vec![].into(),
};
let info = FlightInfo::new()
.try_with_schema(&schema)
Expand Down
9 changes: 8 additions & 1 deletion arrow-flight/examples/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use tonic::{Request, Response, Status, Streaming};
use arrow_flight::{
flight_service_server::FlightService, flight_service_server::FlightServiceServer, Action,
ActionType, Criteria, Empty, FlightData, FlightDescriptor, FlightInfo, HandshakeRequest,
HandshakeResponse, PutResult, SchemaResult, Ticket,
HandshakeResponse, PollInfo, PutResult, SchemaResult, Ticket,
};

#[derive(Clone)]
Expand Down Expand Up @@ -59,6 +59,13 @@ impl FlightService for FlightServiceImpl {
Err(Status::unimplemented("Implement get_flight_info"))
}

async fn poll_flight_info(
&self,
_request: Request<FlightDescriptor>,
) -> Result<Response<PollInfo>, Status> {
Err(Status::unimplemented("Implement poll_flight_info"))
}

async fn get_schema(
&self,
_request: Request<FlightDescriptor>,
Expand Down
266 changes: 266 additions & 0 deletions arrow-flight/src/arrow.flight.protocol.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e7ce4bb

Please sign in to comment.