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

Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a27874d0c Remove old deprecated items (`ffi::export_array_into_raw` 
and IPC `StreamReader::try_new_unbuffered`) (#10479)
3a27874d0c is described below

commit 3a27874d0c97fea642c9bacbbb430cea9dc5e29f
Author: Jeffrey Vo <[email protected]>
AuthorDate: Tue Aug 4 11:24:07 2026 +0900

    Remove old deprecated items (`ffi::export_array_into_raw` and IPC 
`StreamReader::try_new_unbuffered`) (#10479)
    
    Its been long enough we can probably remove them.
    
    As mentioned in their deprecation notices:
    
    - For `export_array_into_raw()` use `FFI_ArrowArray::new()` and
    `FFI_ArrowSchema::try_from()`
    - For `StreamReader::try_new_unbuffered()` use `StreamReader::try_new()`
---
 arrow-array/src/ffi.rs  | 58 -------------------------------------------------
 arrow-ipc/src/reader.rs |  9 --------
 arrow/src/array/mod.rs  |  4 ----
 3 files changed, 71 deletions(-)

diff --git a/arrow-array/src/ffi.rs b/arrow-array/src/ffi.rs
index 7dd63c35af..e1761beb2b 100644
--- a/arrow-array/src/ffi.rs
+++ b/arrow-array/src/ffi.rs
@@ -109,37 +109,8 @@ use arrow_data::{ArrayData, layout};
 pub use arrow_schema::ffi::FFI_ArrowSchema;
 use arrow_schema::{ArrowError, DataType, UnionMode};
 
-use crate::array::ArrayRef;
-
 type Result<T> = std::result::Result<T, ArrowError>;
 
-/// Exports an array to raw pointers of the C Data Interface provided by the 
consumer.
-/// # Safety
-/// Assumes that these pointers represent valid C Data Interfaces, both in 
memory
-/// representation and lifetime via the `release` mechanism.
-///
-/// This function copies the content of two FFI structs 
[arrow_data::ffi::FFI_ArrowArray] and
-/// [arrow_schema::ffi::FFI_ArrowSchema] in the array to the location pointed 
by the raw pointers.
-/// Usually the raw pointers are provided by the array data consumer.
-#[deprecated(
-    since = "52.0.0",
-    note = "Use FFI_ArrowArray::new and FFI_ArrowSchema::try_from"
-)]
-pub unsafe fn export_array_into_raw(
-    src: ArrayRef,
-    out_array: *mut FFI_ArrowArray,
-    out_schema: *mut FFI_ArrowSchema,
-) -> Result<()> {
-    let data = src.to_data();
-    let array = FFI_ArrowArray::new(&data);
-    let schema = FFI_ArrowSchema::try_from(data.data_type())?;
-
-    unsafe { std::ptr::write_unaligned(out_array, array) };
-    unsafe { std::ptr::write_unaligned(out_schema, schema) };
-
-    Ok(())
-}
-
 /// returns the number of bits that buffer `i` (in the C data interface) is 
expected to have.
 /// This is set by the Arrow specification
 fn bit_width(data_type: &DataType, i: usize) -> Result<usize> {
@@ -1151,35 +1122,6 @@ mod tests_to_then_from_ffi {
         Ok(())
     }
 
-    #[test]
-    #[allow(deprecated)]
-    fn test_export_array_into_raw() -> Result<()> {
-        let array = make_array(Int32Array::from(vec![1, 2, 3]).into_data());
-
-        // Assume two raw pointers provided by the consumer
-        let mut out_array = FFI_ArrowArray::empty();
-        let mut out_schema = FFI_ArrowSchema::empty();
-
-        {
-            let out_array_ptr = std::ptr::addr_of_mut!(out_array);
-            let out_schema_ptr = std::ptr::addr_of_mut!(out_schema);
-            unsafe {
-                export_array_into_raw(array, out_array_ptr, out_schema_ptr)?;
-            }
-        }
-
-        // (simulate consumer) import it
-        let data = unsafe { from_ffi(out_array, &out_schema) }?;
-        let array = make_array(data);
-
-        // perform some operation
-        let array = array.as_any().downcast_ref::<Int32Array>().unwrap();
-
-        // verify
-        assert_eq!(array, &Int32Array::from(vec![1, 2, 3]));
-        Ok(())
-    }
-
     #[test]
     fn test_duration() -> Result<()> {
         // create an array natively
diff --git a/arrow-ipc/src/reader.rs b/arrow-ipc/src/reader.rs
index 8349cafc72..05db7a8ad5 100644
--- a/arrow-ipc/src/reader.rs
+++ b/arrow-ipc/src/reader.rs
@@ -1616,15 +1616,6 @@ impl<R: Read> StreamReader<R> {
         })
     }
 
-    /// Deprecated, use [`StreamReader::try_new`] instead.
-    #[deprecated(since = "53.0.0", note = "use `try_new` instead")]
-    pub fn try_new_unbuffered(
-        reader: R,
-        projection: Option<Vec<usize>>,
-    ) -> Result<Self, ArrowError> {
-        Self::try_new(reader, projection)
-    }
-
     /// Return the schema of the stream
     pub fn schema(&self) -> SchemaRef {
         self.schema.clone()
diff --git a/arrow/src/array/mod.rs b/arrow/src/array/mod.rs
index e548c4c837..327acc99b3 100644
--- a/arrow/src/array/mod.rs
+++ b/arrow/src/array/mod.rs
@@ -31,9 +31,5 @@ pub use arrow_data::{
 
 pub use arrow_data::transform::{Capacities, MutableArrayData};
 
-#[cfg(feature = "ffi")]
-#[allow(deprecated)]
-pub use arrow_array::ffi::export_array_into_raw;
-
 // --------------------- Array's values comparison ---------------------
 pub use arrow_ord::ord::{DynComparator, make_comparator};

Reply via email to