Skip to content

Commit 4fd6046

Browse files
committed
[cosmetic] use the arrow Result type alias
1 parent 8366e72 commit 4fd6046

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/flight/exec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ async fn try_fetch_stream(
222222
pub fn enforce_schema(
223223
batch: RecordBatch,
224224
target_schema: &SchemaRef,
225-
) -> std::result::Result<RecordBatch, ArrowError> {
225+
) -> arrow::error::Result<RecordBatch> {
226226
if target_schema.fields.is_empty() || batch.schema() == *target_schema {
227227
Ok(batch)
228228
} else if target_schema.contains(batch.schema_ref()) {
@@ -232,7 +232,7 @@ pub fn enforce_schema(
232232
.fields
233233
.iter()
234234
.map(|field| find_matching_column(&batch, field.as_ref()))
235-
.collect::<std::result::Result<_, _>>()?;
235+
.collect::<arrow::error::Result<_>>()?;
236236
RecordBatch::try_new(target_schema.to_owned(), columns)
237237
}
238238
}
@@ -243,7 +243,7 @@ pub fn enforce_schema(
243243
fn find_matching_column(
244244
batch: &RecordBatch,
245245
field: &Field,
246-
) -> std::result::Result<ArrayRef, ArrowError> {
246+
) -> arrow::error::Result<ArrayRef> {
247247
if let Some(column) = batch.column_by_name(field.name()) {
248248
if column.data_type() == field.data_type() {
249249
Ok(column.to_owned())

0 commit comments

Comments
 (0)