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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ include = [
"NOTICE.txt",
]
edition = "2021"
rust-version = "1.70"
rust-version = "1.81"

[workspace.dependencies]
arrow = { version = "54.3.1", path = "./arrow", default-features = false }
Expand Down
11 changes: 1 addition & 10 deletions arrow-cast/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,20 +463,11 @@ impl Parser for Float64Type {
}
}

/// This API is only stable since 1.70 so can't use it when current MSRV is lower
#[inline(always)]
fn is_some_and<T>(opt: Option<T>, f: impl FnOnce(T) -> bool) -> bool {
match opt {
None => false,
Some(x) => f(x),
}
}

macro_rules! parser_primitive {
($t:ty) => {
impl Parser for $t {
fn parse(string: &str) -> Option<Self::Native> {
if !is_some_and(string.as_bytes().last(), |x| x.is_ascii_digit()) {
if !string.as_bytes().last().is_some_and(|x| x.is_ascii_digit()) {
return None;
}
match atoi::FromRadix10SignedChecked::from_radix_10_signed_checked(
Expand Down
19 changes: 9 additions & 10 deletions arrow-flight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name = "arrow-flight"
description = "Apache Arrow Flight"
version = { workspace = true }
edition = { workspace = true }
rust-version = "1.71.1"
rust-version = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
Expand All @@ -43,12 +43,12 @@ base64 = { version = "0.22", default-features = false, features = ["std"] }
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" , optional = true }
prost = { version = "0.13.1", default-features = false, features = ["prost-derive"] }
paste = { version = "1.0" }
prost = { version = "0.12.3", default-features = false, features = ["prost-derive"] }
# For Timestamp type
prost-types = { version = "0.13.1", default-features = false }
tokio = { version = "1.0", default-features = false, features = ["macros", "rt", "rt-multi-thread"], optional = true }
tonic = { version = "0.12.3", default-features = false, features = ["transport", "codegen", "prost"] }
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"] }

# CLI-related dependencies
anyhow = { version = "1.0", optional = true }
Expand All @@ -61,17 +61,16 @@ all-features = true

[features]
default = []
flight-sql-experimental = ["dep:arrow-arith", "dep:arrow-data", "dep:arrow-ord", "dep:arrow-row", "dep:arrow-select", "dep:arrow-string", "dep:once_cell", "dep:paste"]
flight-sql-experimental = ["dep:arrow-arith", "dep:arrow-data", "dep:arrow-ord", "dep:arrow-row", "dep:arrow-select", "dep:arrow-string", "dep:once_cell"]
tls = ["tonic/tls"]
# Enable CLI tools
cli = ["arrow-array/chrono-tz", "arrow-cast/prettyprint", "tonic/tls-webpki-roots", "dep:anyhow", "dep:clap", "dep:tracing-log", "dep:tracing-subscriber"]

[dev-dependencies]
arrow-cast = { workspace = true, features = ["prettyprint"] }
assert_cmd = "2.0.8"
http = "1.1.0"
http-body = "1.0.0"
hyper-util = "0.1"
http = "0.2.9"
http-body = "0.4.5"
pin-project-lite = "0.2"
tempfile = "3.3"
tracing-log = { version = "0.2" }
Expand Down
6 changes: 2 additions & 4 deletions arrow-flight/examples/flight_sql_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,7 @@ impl ProstMessageExt for FetchResults {
#[cfg(test)]
mod tests {
use super::*;
use futures::{TryFutureExt, TryStreamExt};
use hyper_util::rt::TokioIo;
use futures::TryStreamExt;
use std::fs;
use std::future::Future;
use std::net::SocketAddr;
Expand Down Expand Up @@ -854,8 +853,7 @@ mod tests {
.serve_with_incoming(stream);

let request_future = async {
let connector =
service_fn(move |_| UnixStream::connect(path.clone()).map_ok(TokioIo::new));
let connector = service_fn(move |_| UnixStream::connect(path.clone()));
let channel = Endpoint::try_from("http://example.com")
.unwrap()
.connect_with_connector(connector)
Expand Down
7 changes: 4 additions & 3 deletions arrow-flight/gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name = "gen"
description = "Code generation for arrow-flight"
version = "0.1.0"
edition = { workspace = true }
rust-version = "1.71.1"
rust-version = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
Expand All @@ -32,5 +32,6 @@ publish = false
[dependencies]
# Pin specific version of the tonic-build dependencies to avoid auto-generated
# (and checked in) arrow.flight.protocol.rs from changing
prost-build = { version = "=0.13.5", default-features = false }
tonic-build = { version = "=0.12.3", default-features = false, features = ["transport", "prost"] }
proc-macro2 = { version = "=1.0.86", default-features = false }
prost-build = { version = "=0.12.6", default-features = false }
tonic-build = { version = "=0.11.0", default-features = false, features = ["transport", "prost"] }
4 changes: 2 additions & 2 deletions arrow-flight/gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +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")
.compile_protos_with_config(prost_config(), &[proto_path], &[proto_dir])?;
.compile_with_config(prost_config(), &[proto_path], &[proto_dir])?;

// read file contents to string
let mut file = OpenOptions::new()
Expand All @@ -52,7 +52,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")
.compile_protos_with_config(prost_config(), &[proto_path], &[proto_dir])?;
.compile_with_config(prost_config(), &[proto_path], &[proto_dir])?;

// read file contents to string
let mut file = OpenOptions::new()
Expand Down
Loading
Loading