Skip to content

[AURON #1912] Clean up rust default lints#2039

Open
yew1eb wants to merge 1 commit intoapache:masterfrom
yew1eb:AURON_1912
Open

[AURON #1912] Clean up rust default lints#2039
yew1eb wants to merge 1 commit intoapache:masterfrom
yew1eb:AURON_1912

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Feb 26, 2026

Which issue does this PR close?

Closes #1912

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request removes workspace-level lint allowances for unused_variables, dead_code, unused_imports, unused_must_use, and deprecated from Cargo.toml, and addresses these lint warnings throughout the codebase by either fixing the issues or adding targeted #[allow(...)] attributes where necessary.

Changes:

  • Removed workspace-level lint allowances from Cargo.toml
  • Migrated from deprecated statistics() to partition_statistics(None) API across multiple execution plan implementations
  • Removed unused imports across several modules
  • Added targeted #[allow(deprecated)] and #[allow(dead_code)] attributes where deprecated APIs must still be used or code should be preserved

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Cargo.toml Removed workspace-level lint allowances for unused_variables, dead_code, unused_imports, unused_must_use, and deprecated
native-engine/datafusion-ext-plans/src/sort_exec.rs Migrated to partition_statistics API, silenced skip_rows results, added deprecated allowance for fuzztest module
native-engine/datafusion-ext-plans/src/shuffle_writer_exec.rs Migrated to partition_statistics API
native-engine/datafusion-ext-plans/src/rss_shuffle_writer_exec.rs Migrated to partition_statistics API
native-engine/datafusion-ext-plans/src/parquet_sink_exec.rs Added deprecated allowance for set_max_statistics_size usage
native-engine/datafusion-ext-plans/src/parquet_exec.rs Added deprecated allowance for fetch_parquet_metadata and dead_code allowance for expr_contains_decimal_type
native-engine/datafusion-ext-plans/src/limit_exec.rs Migrated to partition_statistics API, added deprecated allowance for test module
native-engine/datafusion-ext-plans/src/agg/spark_udaf_wrapper.rs Removed unused imports (Cursor, Read, Write, ArrayAccessor, BinaryArray, BinaryBuilder, UninitializedInit)
native-engine/datafusion-ext-functions/src/lib.rs Added unused_variables allowance for spark_partition_id parameter
native-engine/datafusion-ext-exprs/src/spark_scalar_subquery_wrapper.rs Removed unused Write import
native-engine/datafusion-ext-exprs/src/lib.rs Added dead_code allowance for down_cast_any_ref function
native-engine/datafusion-ext-exprs/src/get_indexed_field.rs Removed unused Hasher import
native-engine/datafusion-ext-commons/src/arrow/eq_comparator.rs Modified test_bytes to handle Result returns from test_bytes_impl
native-engine/auron-planner/src/planner.rs Removed unused imports (ExprSchema, PhysicalExpr)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +747 to +750
let _ = test_bytes_impl::<Utf8Type>();
let _ = test_bytes_impl::<LargeUtf8Type>();
let _ = test_bytes_impl::<BinaryType>();
let _ = test_bytes_impl::<LargeBinaryType>();
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The test is silencing potential errors from test_bytes_impl by using let _ = instead of propagating them with the ? operator. If test_bytes_impl fails, the test will still pass instead of failing. Each call should use the ? operator to propagate errors, for example: test_bytes_impl::<Utf8Type>()?;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up temporarily allowed lints in [workspace.lints.rust]

2 participants