Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arrow-flight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ tracing-log = { version = "0.2" }
tracing-subscriber = { version = "0.3.1", default-features = false, features = ["ansi", "env-filter", "fmt"] }
tokio = { version = "1.0", default-features = false, features = ["macros", "rt", "rt-multi-thread"] }
tokio-stream = { version = "0.1", features = ["net"] }
tonic-reflection = "0.12.3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should put the addition in this PR behind a feature flag and mark this dependency as optional?

Copy link
Contributor

@alamb alamb Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please

Update: I see this is only a dev dependency -- so I think it is ok not to feature flag it

tower = { version = "0.5.0", features = ["util"] }
uuid = { version = "1.10.0", features = ["v4"] }

Expand Down
2 changes: 2 additions & 0 deletions arrow-flight/gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// protoc in Ubuntu builder needs this option
.protoc_arg("--experimental_allow_proto3_optional")
.out_dir("src")
.file_descriptor_set_path("src/flight_descriptor.bin")
.compile_protos_with_config(prost_config(), &[proto_path], &[proto_dir])?;

// read file contents to string
Expand All @@ -52,6 +53,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// protoc in Ubuntu builder needs this option
.protoc_arg("--experimental_allow_proto3_optional")
.out_dir("src/sql")
.file_descriptor_set_path("src/sql/flight_sql_descriptor.bin")
.compile_protos_with_config(prost_config(), &[proto_path], &[proto_dir])?;

// read file contents to string
Expand Down
Binary file added arrow-flight/src/flight_descriptor.bin
Binary file not shown.
12 changes: 12 additions & 0 deletions arrow-flight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,24 @@ mod gen {
// Since this file is auto-generated, we suppress all warnings
#![allow(missing_docs)]
include!("arrow.flight.protocol.rs");

/// The descriptor used for making the Arrow Flight gRPC API available for [gRPC
/// reflection](https://grpc.io/docs/guides/reflection/).
///
/// ```
/// let reflection_server = tonic_reflection::server::Builder::configure()
/// .register_encoded_file_descriptor_set(arrow_flight::flight_descriptor::FILE_DESCRIPTOR_SET)
/// .build_v1()
/// .unwrap();
/// ```
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("flight_descriptor.bin");
}

/// Defines a `Flight` for generation or retrieval.
pub mod flight_descriptor {
use super::gen;
pub use gen::flight_descriptor::DescriptorType;
pub use gen::FILE_DESCRIPTOR_SET;
}

/// Low Level [tonic] [`FlightServiceClient`](gen::flight_service_client::FlightServiceClient).
Expand Down
Binary file added arrow-flight/src/sql/flight_sql_descriptor.bin
Binary file not shown.
12 changes: 12 additions & 0 deletions arrow-flight/src/sql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ mod gen {
// Since this file is auto-generated, we suppress all warnings
#![allow(missing_docs)]
include!("arrow.flight.protocol.sql.rs");

/// The descriptor used for making the Arrow Flight SQL gRPC API available for [gRPC
/// reflection](https://grpc.io/docs/guides/reflection/).
///
/// ```
/// let reflection_server = tonic_reflection::server::Builder::configure()
/// .register_encoded_file_descriptor_set(arrow_flight::sql::FILE_DESCRIPTOR_SET)
/// .build_v1()
/// .unwrap();
/// ```
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("flight_sql_descriptor.bin");
}

pub use gen::action_end_transaction_request::EndTransaction;
Expand Down Expand Up @@ -109,6 +120,7 @@ pub use gen::TicketStatementQuery;
pub use gen::UpdateDeleteRules;
pub use gen::XdbcDataType;
pub use gen::XdbcDatetimeSubcode;
pub use gen::FILE_DESCRIPTOR_SET;

pub mod client;
pub mod metadata;
Expand Down
Loading