Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove APIs deprecated since v 4.4.0 #6722

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading