You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by ag...@apache.org on 2026/10/01 23:21:26 UTC

(datafusion-comet) branch branch-1.1 updated: fix: build with Rust 1.99, which deprecates the legacy f64 constants and fetch_update (#6526)

This is an automated email from the ASF dual-hosted git repository.

andygrove pushed a commit to branch branch-1.1
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git


The following commit(s) were added to refs/heads/branch-1.1 by this push:
     new 1075e97625 fix: build with Rust 1.99, which deprecates the legacy f64 constants and fetch_update (#6526)
1075e97625 is described below

commit 1075e97625a2b847deda12ecd991645c809a5651
Author: Andy Grove <ag...@apache.org>
AuthorDate: Thu Oct 1 17:21:22 2026 -0600

    fix: build with Rust 1.99, which deprecates the legacy f64 constants and fetch_update (#6526)
    
    Rust 1.99.0, released 2026-10-01, deprecates the legacy numeric module constants and
    `Atomic*::fetch_update`. CI installs the latest stable toolchain, so `cargo clippy -- -D warnings`
    in the rust-test job has failed on every pull request and merge queue run since.
    
    - A test module in `numeric.rs` imported `core::f64`, so its `f64::NAN`, `f64::INFINITY` and the
      other constants named the deprecated module constants. Without the import they are the
      associated constants on `f64`.
    - The four `fetch_update` calls in the memory pools keep it under `#[allow(deprecated)]`. Its
      replacement, `try_update`, was stabilized in Rust 1.95, newer than the workspace `rust-version`
      of 1.94.
    
    (cherry picked from commit 8a9d46c6a648dff831a9d124d16cb38677fd120c)
---
 native/core/src/execution/memory_pools/spark_memory.rs | 3 +++
 native/core/src/execution/memory_pools/unified_pool.rs | 9 +++++++++
 native/spark-expr/src/conversion_funcs/numeric.rs      | 1 -
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/native/core/src/execution/memory_pools/spark_memory.rs b/native/core/src/execution/memory_pools/spark_memory.rs
index 1db196253e..5a63b7a3f6 100644
--- a/native/core/src/execution/memory_pools/spark_memory.rs
+++ b/native/core/src/execution/memory_pools/spark_memory.rs
@@ -164,6 +164,9 @@ impl SparkMemory {
     }
 
     /// Takes up to `size` bytes off the overcommit in one atomic step and returns how many.
+    // Rust 1.99 deprecates `fetch_update` in favor of `try_update`, which needs Rust 1.95, newer
+    // than the workspace `rust-version`.
+    #[allow(deprecated)]
     fn repay(&self, size: usize) -> usize {
         let debt = self
             .overcommit
diff --git a/native/core/src/execution/memory_pools/unified_pool.rs b/native/core/src/execution/memory_pools/unified_pool.rs
index f023d51af2..a9f6a0b422 100644
--- a/native/core/src/execution/memory_pools/unified_pool.rs
+++ b/native/core/src/execution/memory_pools/unified_pool.rs
@@ -96,6 +96,9 @@ impl MemoryPool for CometUnifiedMemoryPool {
     }
 
     /// Records memory that already exists, so it must not fail; see [`SparkMemory`].
+    // Rust 1.99 deprecates `fetch_update` in favor of `try_update`, which needs Rust 1.95, newer
+    // than the workspace `rust-version`.
+    #[allow(deprecated)]
     fn grow(&self, _: &MemoryReservation, additional: usize) {
         if additional == 0 {
             return;
@@ -106,6 +109,9 @@ impl MemoryPool for CometUnifiedMemoryPool {
             .unwrap();
     }
 
+    // Rust 1.99 deprecates `fetch_update` in favor of `try_update`, which needs Rust 1.95, newer
+    // than the workspace `rust-version`.
+    #[allow(deprecated)]
     fn shrink(&self, _: &MemoryReservation, size: usize) {
         if let Err(e) = self.spark.release(size) {
             panic!(
@@ -124,6 +130,9 @@ impl MemoryPool for CometUnifiedMemoryPool {
         }
     }
 
+    // Rust 1.99 deprecates `fetch_update` in favor of `try_update`, which needs Rust 1.95, newer
+    // than the workspace `rust-version`.
+    #[allow(deprecated)]
     fn try_grow(&self, _: &MemoryReservation, additional: usize) -> Result<(), DataFusionError> {
         if additional > 0 {
             // A partial grant is handed back and refused, which triggers spilling in the caller.
diff --git a/native/spark-expr/src/conversion_funcs/numeric.rs b/native/spark-expr/src/conversion_funcs/numeric.rs
index 81972425e8..7e8ab4b74d 100644
--- a/native/spark-expr/src/conversion_funcs/numeric.rs
+++ b/native/spark-expr/src/conversion_funcs/numeric.rs
@@ -1456,7 +1456,6 @@ mod tests {
     use super::*;
     use arrow::array::AsArray;
     use arrow::datatypes::TimestampMicrosecondType;
-    use core::f64;
 
     #[test]
     fn test_spark_cast_int_to_int_overflow() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org