diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a7bf850c08..f66071db0c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: - name: Install clippy run: rustup component add clippy - name: "clippy --all" - run: cargo clippy --all --tests + run: cargo clippy --all --tests -- -D warnings fmt: name: fmt @@ -64,8 +64,8 @@ jobs: - uses: Swatinem/rust-cache@v1 - name: Install rustfmt run: rustup component add rustfmt - - - run: cargo fmt + - name: Run + run: cargo fmt --all -- --check miri-checks: name: Miri diff --git a/src/array/mod.rs b/src/array/mod.rs index f13b0a4eb00..ce5132b80e6 100644 --- a/src/array/mod.rs +++ b/src/array/mod.rs @@ -174,23 +174,6 @@ macro_rules! fmt_dyn { }}; } -macro_rules! with_match_dictionary_key_type {( - $key_type:expr, | $_:tt $T:ident | $($body:tt)* -) => ({ - macro_rules! __with_ty__ {( $_ $T:ident ) => ( $($body)* )} - match $key_type { - DataType::Int8 => __with_ty__! { i8 }, - DataType::Int16 => __with_ty__! { i16 }, - DataType::Int32 => __with_ty__! { i32 }, - DataType::Int64 => __with_ty__! { i64 }, - DataType::UInt8 => __with_ty__! { u8 }, - DataType::UInt16 => __with_ty__! { u16 }, - DataType::UInt32 => __with_ty__! { u32 }, - DataType::UInt64 => __with_ty__! { u64 }, - _ => ::core::unreachable!("A dictionary key type can only be of integer types"), - } -})} - macro_rules! with_match_physical_dictionary_key_type {( $key_type:expr, | $_:tt $T:ident | $($body:tt)* ) => ({ diff --git a/src/datatypes/field.rs b/src/datatypes/field.rs index af18073070a..29a2248e2af 100644 --- a/src/datatypes/field.rs +++ b/src/datatypes/field.rs @@ -281,16 +281,3 @@ impl std::fmt::Display for Field { pub(crate) type Metadata = Option>; pub(crate) type Extension = Option<(String, Option)>; - -pub(crate) fn get_extension(metadata: &Option>) -> Extension { - if let Some(metadata) = metadata { - if let Some(name) = metadata.get("ARROW:extension:name") { - let metadata = metadata.get("ARROW:extension:metadata").cloned(); - Some((name.clone(), metadata)) - } else { - None - } - } else { - None - } -} diff --git a/src/datatypes/mod.rs b/src/datatypes/mod.rs index d8fbabe1e3d..b99d76c976a 100644 --- a/src/datatypes/mod.rs +++ b/src/datatypes/mod.rs @@ -8,7 +8,7 @@ pub use field::Field; pub use physical_type::*; pub use schema::Schema; -pub(crate) use field::{get_extension, Extension, Metadata}; +pub(crate) use field::{Extension, Metadata}; /// The set of supported logical types. /// Each variant uniquely identifies a logical type, which define specific semantics to the data (e.g. how it should be represented).