This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-11436-a2f3034ffaf107c6b2afb13371d128e892551ac5 in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit 989a8fbb8605280eb44b2325e3c8a49ce811d534 Author: Ed Seidl <[email protected]> AuthorDate: Thu Oct 8 02:08:29 2026 +0000 chore: Silence clippy warning about `get_encoder` (#11436) # Which issue does this PR close? None # Rationale for this change #11051 removed some usage of the experimental `parquet::encodings::encoding::get_encoder` function. This causes a clippy dead code warning when running with the `--workspace` argument as suggested in `CONTRIBUTING.md`. CI tests instead run with `-p parquet` which does not trigger the dead code warning. ``` % cargo clippy --workspace --all-targets --all-features -- -D warnings Blocking waiting for file lock on build directory Checking parquet v60.0.0 (/Users/seidl2/src/arrow-rs/parquet) error: function `get_encoder` is never used --> parquet/src/encodings/encoding/mod.rs:88:8 | 88 | pub fn get_encoder<T: DataType>( | ^^^^^^^^^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[expect(dead_code)]` or `#[allow(dead_code)]` error: could not compile `parquet` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... ``` ``` % cargo clippy -p parquet --all-targets --all-features -- -D warnings Checking parquet v60.0.0 (/Users/seidl2/src/arrow-rs/parquet) Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.49s ``` # What changes are included in this PR? Selectively ignore the dead code warning. # Are these changes tested? N/A # Are there any significant user-facing changes? No --- parquet/src/encodings/encoding/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parquet/src/encodings/encoding/mod.rs b/parquet/src/encodings/encoding/mod.rs index be53e94a22..4f50cd95cc 100644 --- a/parquet/src/encodings/encoding/mod.rs +++ b/parquet/src/encodings/encoding/mod.rs @@ -84,6 +84,7 @@ pub trait Encoder<T: DataType>: Send { /// Gets a encoder for the particular data type `T` and encoding `encoding`. Memory usage /// for the encoder instance is tracked by `mem_tracker`. +#[cfg_attr(all(not(feature = "experimental"), not(test)), expect(dead_code))] pub fn get_encoder<T: DataType>( encoding: Encoding, descr: &ColumnDescPtr,
