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

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


The following commit(s) were added to refs/heads/main by this push:
     new c518b7805 fix: memory pool error type (#1346)
c518b7805 is described below

commit c518b7805fb0da8dffa4a13041fe9ca09407cfd9
Author: KAZUYUKI TANIMURA <ktanim...@apple.com>
AuthorDate: Tue Jan 28 06:46:57 2025 -0800

    fix: memory pool error type (#1346)
---
 native/core/src/execution/memory_pool.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/native/core/src/execution/memory_pool.rs 
b/native/core/src/execution/memory_pool.rs
index 4eb18c3f1..fc7423adc 100644
--- a/native/core/src/execution/memory_pool.rs
+++ b/native/core/src/execution/memory_pool.rs
@@ -26,7 +26,7 @@ use std::{
 use jni::objects::GlobalRef;
 
 use datafusion::{
-    common::DataFusionError,
+    common::{resources_datafusion_err, DataFusionError},
     execution::memory_pool::{MemoryPool, MemoryReservation},
 };
 
@@ -101,12 +101,12 @@ impl MemoryPool for CometMemoryPool {
                 // Release the acquired bytes before throwing error
                 self.release(acquired as usize)?;
 
-                return Err(DataFusionError::Execution(format!(
+                return Err(resources_datafusion_err!(
                     "Failed to acquire {} bytes, only got {}. Reserved: {}",
                     additional,
                     acquired,
-                    self.reserved(),
-                )));
+                    self.reserved()
+                ));
             }
             self.used.fetch_add(additional, Relaxed);
         }


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

Reply via email to