|
17 | 17 |
|
18 | 18 | //! Utilities to assist with reading and writing Arrow data as Flight messages
|
19 | 19 |
|
20 |
| -use crate::{FlightData, IpcMessage, SchemaAsIpc, SchemaResult}; |
21 |
| -use bytes::Bytes; |
| 20 | +use crate::{FlightData, SchemaAsIpc}; |
22 | 21 | use std::collections::HashMap;
|
23 | 22 | use std::sync::Arc;
|
24 | 23 |
|
@@ -104,41 +103,6 @@ pub fn flight_data_to_arrow_batch(
|
104 | 103 | })?
|
105 | 104 | }
|
106 | 105 |
|
107 |
| -/// Convert a `Schema` to `SchemaResult` by converting to an IPC message |
108 |
| -#[deprecated( |
109 |
| - since = "4.4.0", |
110 |
| - note = "Use From trait, e.g.: SchemaAsIpc::new(schema, options).try_into()" |
111 |
| -)] |
112 |
| -pub fn flight_schema_from_arrow_schema( |
113 |
| - schema: &Schema, |
114 |
| - options: &IpcWriteOptions, |
115 |
| -) -> Result<SchemaResult, ArrowError> { |
116 |
| - SchemaAsIpc::new(schema, options).try_into() |
117 |
| -} |
118 |
| - |
119 |
| -/// Convert a `Schema` to `FlightData` by converting to an IPC message |
120 |
| -#[deprecated( |
121 |
| - since = "4.4.0", |
122 |
| - note = "Use From trait, e.g.: SchemaAsIpc::new(schema, options).into()" |
123 |
| -)] |
124 |
| -pub fn flight_data_from_arrow_schema(schema: &Schema, options: &IpcWriteOptions) -> FlightData { |
125 |
| - SchemaAsIpc::new(schema, options).into() |
126 |
| -} |
127 |
| - |
128 |
| -/// Convert a `Schema` to bytes in the format expected in `FlightInfo.schema` |
129 |
| -#[deprecated( |
130 |
| - since = "4.4.0", |
131 |
| - note = "Use TryFrom trait, e.g.: SchemaAsIpc::new(schema, options).try_into()" |
132 |
| -)] |
133 |
| -pub fn ipc_message_from_arrow_schema( |
134 |
| - schema: &Schema, |
135 |
| - options: &IpcWriteOptions, |
136 |
| -) -> Result<Bytes, ArrowError> { |
137 |
| - let message = SchemaAsIpc::new(schema, options).try_into()?; |
138 |
| - let IpcMessage(vals) = message; |
139 |
| - Ok(vals) |
140 |
| -} |
141 |
| - |
142 | 106 | /// Convert `RecordBatch`es to wire protocol `FlightData`s
|
143 | 107 | pub fn batches_to_flight_data(
|
144 | 108 | schema: &Schema,
|
|
0 commit comments