From cc4bd4675c78e45d542de4c0ce925b834099f38a Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Thu, 21 Nov 2024 15:35:32 +0100 Subject: [PATCH] Remove APIs deprecated since v 4.4.0 (#6722) The deprecated APIs are not supposed to stay around for ever. The purpose of deprecation is to eventually remove. --- arrow-flight/src/utils.rs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/arrow-flight/src/utils.rs b/arrow-flight/src/utils.rs index f6129ddfe248..c3a2e0d0bdd1 100644 --- a/arrow-flight/src/utils.rs +++ b/arrow-flight/src/utils.rs @@ -17,8 +17,7 @@ //! Utilities to assist with reading and writing Arrow data as Flight messages -use crate::{FlightData, IpcMessage, SchemaAsIpc, SchemaResult}; -use bytes::Bytes; +use crate::{FlightData, SchemaAsIpc}; use std::collections::HashMap; use std::sync::Arc; @@ -104,41 +103,6 @@ pub fn flight_data_to_arrow_batch( })? } -/// Convert a `Schema` to `SchemaResult` by converting to an IPC message -#[deprecated( - since = "4.4.0", - note = "Use From trait, e.g.: SchemaAsIpc::new(schema, options).try_into()" -)] -pub fn flight_schema_from_arrow_schema( - schema: &Schema, - options: &IpcWriteOptions, -) -> Result { - SchemaAsIpc::new(schema, options).try_into() -} - -/// Convert a `Schema` to `FlightData` by converting to an IPC message -#[deprecated( - since = "4.4.0", - note = "Use From trait, e.g.: SchemaAsIpc::new(schema, options).into()" -)] -pub fn flight_data_from_arrow_schema(schema: &Schema, options: &IpcWriteOptions) -> FlightData { - SchemaAsIpc::new(schema, options).into() -} - -/// Convert a `Schema` to bytes in the format expected in `FlightInfo.schema` -#[deprecated( - since = "4.4.0", - note = "Use TryFrom trait, e.g.: SchemaAsIpc::new(schema, options).try_into()" -)] -pub fn ipc_message_from_arrow_schema( - schema: &Schema, - options: &IpcWriteOptions, -) -> Result { - let message = SchemaAsIpc::new(schema, options).try_into()?; - let IpcMessage(vals) = message; - Ok(vals) -} - /// Convert `RecordBatch`es to wire protocol `FlightData`s pub fn batches_to_flight_data( schema: &Schema,