Skip to content

Commit

Permalink
Remove APIs deprecated since v 4.4.0 (#6722)
Browse files Browse the repository at this point in the history
The deprecated APIs are not supposed to stay around for ever. The
purpose of deprecation is to eventually remove.
  • Loading branch information
findepi authored Nov 21, 2024
1 parent e65787a commit cc4bd46
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions arrow-flight/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<SchemaResult, ArrowError> {
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<Bytes, ArrowError> {
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,
Expand Down

0 comments on commit cc4bd46

Please sign in to comment.