Skip to content

Conversation

@brunal
Copy link
Contributor

@brunal brunal commented Feb 8, 2026

  • CacheOptions: use in arrow/push_decoder/reader_builder/mod.rs was
    unused. But removing it triggers a doc complaint in array_reader.rs.
    I fix it by spelling out CacheOptions at one usage site.

  • ExtensionType import was unused in arrow/schema/extension.rs when
    compiling with default features. Only use it inside the
    feature-guarded code paths.

  • Prefix unused function arguments with _.

  • Some code in parquet/tests/arrow_reader/io/mod.rs is unused. As I lack
    knowledge of the context, I just add just add #[allow(dead_code)].

Rationale for this change

rust-analyzer bugs me about those unused symbols & co.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Feb 8, 2026
@brunal brunal marked this pull request as draft February 8, 2026 08:50
@brunal brunal force-pushed the main branch 2 times, most recently from 2bb71a6 to efe310e Compare February 9, 2026 09:14
* CacheOptions: `use` in arrow/push_decoder/reader_builder/mod.rs was
  unused. But removing it triggers a doc complaint in array_reader.rs.
  I fix it by spelling out `CacheOptions` at one usage site.

* ExtensionType import was unused in arrow/schema/extension.rs when
  compiling with default features. Only `use` it inside the
  feature-guarded code paths.

* Prefix unused function arguments with `_`.

* Some code in parquet/tests/arrow_reader/io/mod.rs is unused. As I lack
  knowledge of the context, I just add just add #[allow(dead_code)].
@brunal brunal marked this pull request as ready for review February 9, 2026 14:12
Comment on lines 21 to 25
//! Arrow [`arrow_schema::extension::ExtensionType`]s.
//!
//! Extension types are represented using the metadata from Arrow [`Field`]s
//! with the key "ARROW:extension:name".

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//! Arrow [`ExtensionType`]s.
//!
//! Extension types are represented using the metadata from Arrow [`Field`]s
//! with the key "ARROW:extension:name".
//!
//! [`ExtensionType`]: arrow_schema::extension::ExtensionType

Maybe we can do it like this to keep it clean

ops: Arc<OperationLog>,
/// The (pre-parsed) parquet metadata for this file
// TODO: this is unused; consider removing it.
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe for this dead code we can use it in a test somewhere to assert something useful? 🤔

match parquet_logical_type {
#[cfg(feature = "variant_experimental")]
LogicalType::Variant { .. } => {
arrow_field.try_with_extension_type(parquet_variant_compute::VariantType)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could rebind in each of these arms like so?

let mut arrow_field = arrow_field;

I usually prefer to use expect instead of allow but we'd need to cfg it with three different features here, so maybe its easier to just narrow the mut scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants