diff --git a/Cargo.toml b/Cargo.toml index e4cf0c9..d6b4156 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,8 @@ license = "MIT" [workspace.dependencies] ahash = "0.8.3" -arrow = "45.0.0" -arrow-flight = "45.0.0" +arrow = "56.0.0" +arrow-flight = "56.0.0" async-compression = { version = "0.3.15", features = ["tokio", "stream", "zstd"] } async-trait = "0.1.72" atoi = "2.0.0" @@ -60,7 +60,7 @@ thiserror = "1.0.44" tokio = { version = "1.29.1", features = ["full"], default-features = true } tokio-tar = "0.3.1" tokio-util = {version = "0.7.8", features = ["io"] } -tonic = "0.9" +tonic = "0.13" [workspace.metadata.release] pre-release-commit-message = "Release {{crate_name}} {{version}}" diff --git a/crates/builder/src/input/edgelist.rs b/crates/builder/src/input/edgelist.rs index f14ea64..891cf88 100644 --- a/crates/builder/src/input/edgelist.rs +++ b/crates/builder/src/input/edgelist.rs @@ -122,7 +122,7 @@ impl Edges for EdgeList { Self: 'a; fn edges(&self) -> Self::EdgeIter<'_> { - self.list.into_par_iter().copied() + self.list.as_ref().into_par_iter().copied() } #[cfg(test)] diff --git a/crates/server/src/actions.rs b/crates/server/src/actions.rs index fa0db65..adb5960 100644 --- a/crates/server/src/actions.rs +++ b/crates/server/src/actions.rs @@ -142,15 +142,15 @@ impl TryFrom for CreateGraphCommand { type Error = Status; fn try_from(descriptor: FlightDescriptor) -> Result { - match DescriptorType::from_i32(descriptor.r#type) { - None => Err(Status::invalid_argument(format!( + match DescriptorType::try_from(descriptor.r#type) { + Err(_) => Err(Status::invalid_argument(format!( "unsupported descriptor type: {}", descriptor.r#type ))), - Some(DescriptorType::Cmd) => { + Ok(DescriptorType::Cmd) => { serde_json::from_slice::(&descriptor.cmd).map_err(from_json_error) } - Some(descriptor_type) => Err(Status::invalid_argument(format!( + Ok(descriptor_type) => Err(Status::invalid_argument(format!( "Expected command, got {descriptor_type:?}" ))), } diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index 959510d..027bf91 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -11,6 +11,8 @@ //! //! Check the `examples` folder for scripts that demonstrate client-server interaction. +#![allow(clippy::result_large_err)] + mod actions; mod catalog; mod server; diff --git a/crates/server/src/server.rs b/crates/server/src/server.rs index d700789..0a76b47 100644 --- a/crates/server/src/server.rs +++ b/crates/server/src/server.rs @@ -16,7 +16,7 @@ use arrow::{datatypes::Schema, ipc::writer::IpcWriteOptions}; use arrow_flight::utils::flight_data_to_arrow_batch; use arrow_flight::{ flight_service_server::FlightService, Action, ActionType, Criteria, Empty, FlightData, - FlightDescriptor, FlightInfo, HandshakeRequest, HandshakeResponse, PutResult, SchemaAsIpc, + FlightDescriptor, FlightInfo, HandshakeRequest, HandshakeResponse, PollInfo, PutResult, SchemaAsIpc, SchemaResult, Ticket, }; use futures::stream::BoxStream; @@ -278,6 +278,13 @@ impl FlightService for FlightServiceImpl { Err(Status::unimplemented("Not yet implemented")) } + async fn poll_flight_info( + &self, + _request: Request, + ) -> FlightResult> { + Err(Status::unimplemented("Not yet implemented")) + } + async fn get_schema( &self, _request: Request,