You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/10/01 14:58:13 UTC
[PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
neilconway opened a new pull request, #25935:
URL: https://github.com/apache/datafusion/pull/25935
## Which issue does this PR close?
- N/A
## Rationale for this change
Update the Rust toolchain version to 1.99, and the MSRV to Rust 1.95.
## What changes are included in this PR?
* Fix various new clippy warnings
* Add migration guide note for MSRV bump
## What is the testing strategy for this PR?
Existing tests pass.
## Are there any user-facing changes?
Yes, MSRV bump.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4157387957
##########
datafusion/functions/src/core/getfield.rs:
##########
@@ -351,11 +349,8 @@ impl ScalarUDFImpl for GetFieldFunc {
// the underlying struct, then wrap the result back in the
// same Dictionary type so the promised type matches execution.
DataType::Dictionary(key_type, value_type)
- if matches!(value_type.as_ref(), DataType::Struct(_)) =>
+ if let DataType::Struct(fields) = value_type.as_ref() =>
{
- let DataType::Struct(fields) = value_type.as_ref() else {
- unreachable!()
- };
Review Comment:
Minor code cleanup enabled by the MSRV bump.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156998478
##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -1643,9 +1642,9 @@ impl DisplayAs for RepartitionExec {
if self.preserve_order {
writeln!(f, "preserve_order={}", self.preserve_order)?;
}
- Ok(())
}
}
+ Ok(())
Review Comment:
clippy 1.99 extended `branches_sharing_code` to match expressions whose arms all end with the same expression (rust-lang/rust-clippy#17313)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#issuecomment-5953390956
@kumarUjjawal Thanks for the review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156937395
##########
datafusion/core/tests/memory_limit/memory_limit_validation/utils.rs:
##########
@@ -70,15 +70,7 @@ where
);
if let Some(process) = sys.process(pid) {
let rss_bytes = process.memory();
- max_rss_clone
- .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
- if rss_bytes as usize > current {
- Some(rss_bytes as usize)
- } else {
- None
- }
- })
- .ok();
+ max_rss_clone.fetch_max(rss_bytes as usize, Ordering::Relaxed);
Review Comment:
This should be equivalent; `fetch_update` is deprecated and `fetch_max` is more concise anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#issuecomment-5934596241
## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/25935?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `93.75000%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 82.58%. Comparing base ([`242b96c`](https://app.codecov.io/gh/apache/datafusion/commit/242b96c231636b5738125678a83197896a5cc64b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d305d12`](https://app.codecov.io/gh/apache/datafusion/commit/d305d122c31d49ab5c7155eeb3c9aa2a32e85285?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion/pull/25935?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [datafusion/functions-aggregate/src/first\_last.rs](https://app.codecov.io/gh/apache/datafusion/pull/25935?src=pr&el=tree&filepath=datafusion%2Ffunctions-aggregate%2Fsrc%2Ffirst_last.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9mdW5jdGlvbnMtYWdncmVnYXRlL3NyYy9maXJzdF9sYXN0LnJz) | 80.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/25935?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #25935 +/- ##
==========================================
- Coverage 82.58% 82.58% -0.01%
==========================================
Files 1145 1145
Lines 443749 443773 +24
Branches 443749 443773 +24
==========================================
+ Hits 366484 366495 +11
- Misses 55009 55014 +5
- Partials 22256 22264 +8
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/25935?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156977135
##########
Cargo.toml:
##########
@@ -273,6 +273,7 @@ wildcard_dependencies = "warn"
# Pedantic lints we opt out of, with the number of hits at the time we enabled `pedantic`.
# Some of these we should consider enabling.
+assert_is_empty = "allow" # 105 hits
Review Comment:
The alternative is to replace all `is_empty` asserts with something like `assert_eq!(v, [] as [T; 0])`, but that doesn't seem like a very useful way to spend our time, in my opinion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway merged PR #25935:
URL: https://github.com/apache/datafusion/pull/25935
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156964769
##########
datafusion/substrait/src/logical_plan/consumer/rel/fetch_rel.rs:
##########
@@ -22,6 +22,10 @@ use datafusion::logical_expr::{LogicalPlan, LogicalPlanBuilder, lit};
use substrait::proto::{FetchRel, fetch_rel};
#[async_recursion]
+#[expect(
+ clippy::double_must_use,
+ reason = "`async_recursion` adds `#[must_use]` to the boxed future it returns"
+)]
Review Comment:
This warning comes from `async_recursion` 1.1.1: https://github.com/dcchut/async-recursion/issues/49
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Upgrade to Rust 1.99, MSRV to 1.95 [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on code in PR #25935:
URL: https://github.com/apache/datafusion/pull/25935#discussion_r4156942320
##########
datafusion/execution/src/memory_pool/mod.rs:
##########
@@ -412,7 +412,7 @@ impl MemoryReservation {
/// Panics if `capacity` exceeds [`Self::size`]
pub fn shrink(&self, capacity: usize) {
self.size
- .fetch_update(
+ .try_update(
Review Comment:
This is just a rename to avoid deprecation warning, behavior is the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org