Skip to content

Apache DataFusion SQL Query Engine

ARROW-9631: [Rust] flight should depend on arrow, not the other way around

Andy Grove3bd740c24997
diff --git a/dev/release/00-prepare-test.rb b/dev/release/00-prepare-test.rb
index c7b6b9e477..cf4b8bfdb1 100644
--- a/dev/release/00-prepare-test.rb
+++ b/dev/release/00-prepare-test.rb
@@ -267,6 +267,8 @@ class PrepareTest < Test::Unit::TestCase
hunks: [
["-version = \"#{@snapshot_version}\"",
"+version = \"#{@release_version}\""],
+ ["-arrow = { path = \"../arrow\", version = \"#{@snapshot_version}\" }",
+ "+arrow = { path = \"../arrow\", version = \"#{@release_version}\" }"],
],
},
{
@@ -274,8 +276,6 @@ class PrepareTest < Test::Unit::TestCase
hunks: [
["-version = \"#{@snapshot_version}\"",
"+version = \"#{@release_version}\""],
- ["-arrow-flight = { path = \"../arrow-flight\", optional = true, version = \"#{@snapshot_version}\" }",
- "+arrow-flight = { path = \"../arrow-flight\", optional = true, version = \"#{@release_version}\" }"],
],
},
{
@@ -474,6 +474,8 @@ class PrepareTest < Test::Unit::TestCase
hunks: [
["-version = \"#{@release_version}\"",
"+version = \"#{@next_snapshot_version}\""],
+ ["-arrow = { path = \"../arrow\", version = \"#{@release_version}\" }",
+ "+arrow = { path = \"../arrow\", version = \"#{@next_snapshot_version}\" }"],
],
},
{
@@ -481,8 +483,6 @@ class PrepareTest < Test::Unit::TestCase
hunks: [
["-version = \"#{@release_version}\"",
"+version = \"#{@next_snapshot_version}\""],
- ["-arrow-flight = { path = \"../arrow-flight\", optional = true, version = \"#{@release_version}\" }",
- "+arrow-flight = { path = \"../arrow-flight\", optional = true, version = \"#{@next_snapshot_version}\" }"],
],
},
{
diff --git a/rust/datafusion/examples/flight_client.rs b/rust/datafusion/examples/flight_client.rs
index cdc697c9ae..f33714f553 100644
--- a/rust/datafusion/examples/flight_client.rs
+++ b/rust/datafusion/examples/flight_client.rs
@@ -19,12 +19,12 @@ use std::convert::TryFrom;
use std::sync::Arc;
use arrow::datatypes::Schema;
-use arrow::flight::flight_data_to_batch;
use arrow::util::pretty;
-use flight::flight_descriptor;
-use flight::flight_service_client::FlightServiceClient;
-use flight::{FlightDescriptor, Ticket};
+use arrow_flight::flight_descriptor;
+use arrow_flight::flight_service_client::FlightServiceClient;
+use arrow_flight::utils::flight_data_to_batch;
+use arrow_flight::{FlightDescriptor, Ticket};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
diff --git a/rust/datafusion/examples/flight_server.rs b/rust/datafusion/examples/flight_server.rs
index b4592ba1c0..a3eff83884 100644
--- a/rust/datafusion/examples/flight_server.rs
+++ b/rust/datafusion/examples/flight_server.rs
@@ -25,7 +25,7 @@ use datafusion::datasource::parquet::ParquetTable;
use datafusion::datasource::TableProvider;
use datafusion::execution::context::ExecutionContext;
-use flight::{
+use arrow_flight::{
flight_service_server::FlightService, flight_service_server::FlightServiceServer,
Action, ActionType, Criteria, Empty, FlightData, FlightDescriptor, FlightInfo,
HandshakeRequest, HandshakeResponse, PutResult, SchemaResult, Ticket,
@@ -50,7 +50,12 @@ impl FlightService for FlightServiceImpl {
type DoPutStream =
Pin<Box<dyn Stream<Item = Result<PutResult, Status>> + Send + Sync + 'static>>;
type DoActionStream = Pin<
- Box<dyn Stream<Item = Result<flight::Result, Status>> + Send + Sync + 'static>,
+ Box<
+ dyn Stream<Item = Result<arrow_flight::Result, Status>>
+ + Send
+ + Sync
+ + 'static,
+ >,
>;
type ListActionsStream =
Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send + Sync + 'static>>;