Remove lint issues in parquet-related code.#9375
Conversation
2bb71a6 to
efe310e
Compare
* 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)].
parquet/tests/arrow_reader/io/mod.rs
Outdated
| ops: Arc<OperationLog>, | ||
| /// The (pre-parsed) parquet metadata for this file | ||
| // TODO: this is unused; consider removing it. | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
Maybe for this dead code we can use it in a test somewhere to assert something useful? 🤔
There was a problem hiding this comment.
I lack context to be the one to tackle it!
There was a problem hiding this comment.
we can probably replace it with cfg(feature(async)) or something
There was a problem hiding this comment.
I took the liberty of fixing this locally and pushing to this branch
|
Thank you @brunal 🙏 |
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
|
Comments addressed. I'm not sure whether this repo squashes commits when merging, or leaves them as-is. LMK if it's the latter than I'll force push a single nice commit. |
it squashes commits |
parquet/tests/arrow_reader/io/mod.rs
Outdated
| ops: Arc<OperationLog>, | ||
| /// The (pre-parsed) parquet metadata for this file | ||
| // TODO: this is unused; consider removing it. | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
we can probably replace it with cfg(feature(async)) or something
CacheOptions:
usein arrow/push_decoder/reader_builder/mod.rs wasunused. But removing it triggers a doc complaint in array_reader.rs.
I fix it by spelling out
CacheOptionsat one usage site.ExtensionType import was unused in arrow/schema/extension.rs when
compiling with default features. Only
useit inside thefeature-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.