Skip to content

chore: Enable unused_async lint#23679

Open
neilconway wants to merge 2 commits into
apache:mainfrom
neilconway:neilc/chore-unused-async
Open

chore: Enable unused_async lint#23679
neilconway wants to merge 2 commits into
apache:mainfrom
neilconway:neilc/chore-unused-async

Conversation

@neilconway

@neilconway neilconway commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes: N/A

Rationale for this change

There are a reasonable number of places where we have functions marked as async that don't need to be so. Fix this by enabling the unused_async lint, and fixing up the resulting breakage. There are a handful of spots that need an expect(clippy::unused_async) -- mostly mocks of async methods and example code.

What changes are included in this PR?

  • Enable unused_async lint
  • Remove unnecessary async annotations in a bunch of places
  • Add expect(clippy::unused_async) where necessary

Are these changes tested?

Yes, covered by existing tests (no behavioral change expected).

Are there any user-facing changes?

Yes: this PR updates a few public APIs:

  • datafusion_cli::command::OutputFormat::execute
  • datafusion::test_util::parquet::TestParquetFile::create_scan
  • datafusion_datasource_csv::file_format::CsvFormat::read_to_delimited_chunks_from_stream
  • datafusion_substrait::serializer::deserialize_bytes

Migration is mostly straightforward (e.g., removing await from calling code).

@github-actions github-actions Bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate catalog Related to the catalog crate execution Related to the execution crate datasource Changes to the datasource crate physical-plan Changes to the physical-plan crate labels Jul 17, 2026
@neilconway

Copy link
Copy Markdown
Contributor Author

If it is preferred, I can revert the changes to the public APIs and add expect to those places instead.

@neilconway neilconway added the api change Changes the API exposed to users of the crate label Jul 17, 2026
@codecov-commenter

codecov-commenter commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.75000% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.67%. Comparing base (1e58928) to head (52344c9).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/physical-plan/src/limit.rs 22.72% 0 Missing and 17 partials ⚠️
benchmarks/src/imdb/run.rs 0.00% 2 Missing ⚠️
datafusion/datasource-parquet/src/metadata.rs 33.33% 0 Missing and 2 partials ⚠️
.../src/logical_plan/consumer/expr/scalar_function.rs 89.47% 0 Missing and 2 partials ⚠️
datafusion/physical-plan/src/sorts/sort.rs 80.00% 0 Missing and 1 partial ⚠️
datafusion/substrait/src/serializer.rs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23679      +/-   ##
==========================================
- Coverage   80.67%   80.67%   -0.01%     
==========================================
  Files        1086     1087       +1     
  Lines      366800   367527     +727     
  Branches   366800   367527     +727     
==========================================
+ Hits       295912   296491     +579     
- Misses      53260    53374     +114     
- Partials    17628    17662      +34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

api change Changes the API exposed to users of the crate catalog Related to the catalog crate core Core DataFusion crate datasource Changes to the datasource crate execution Related to the execution crate physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants