Skip to content

Commit 2a84141

Browse files
committed
cargo_fmt
1 parent d899199 commit 2a84141

13 files changed

Lines changed: 45 additions & 55 deletions

datafusion/ffi/src/catalog_provider.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ pub struct FFI_CatalogProvider {
4545
name: StabbyString,
4646
) -> FfiOption<FFI_SchemaProvider>,
4747

48-
pub register_schema:
49-
unsafe extern "C" fn(
50-
provider: &Self,
51-
name: StabbyString,
52-
schema: &FFI_SchemaProvider,
53-
) -> FFIResult<FfiOption<FFI_SchemaProvider>>,
48+
pub register_schema: unsafe extern "C" fn(
49+
provider: &Self,
50+
name: StabbyString,
51+
schema: &FFI_SchemaProvider,
52+
)
53+
-> FFIResult<FfiOption<FFI_SchemaProvider>>,
5454

5555
pub deregister_schema:
5656
unsafe extern "C" fn(

datafusion/ffi/src/catalog_provider_list.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ pub struct FFI_CatalogProviderList {
4747
pub catalog_names: unsafe extern "C" fn(&Self) -> StabbyVec<StabbyString>,
4848

4949
/// Access a catalog
50-
pub catalog: unsafe extern "C" fn(
51-
&Self,
52-
name: StabbyString,
53-
) -> FfiOption<FFI_CatalogProvider>,
50+
pub catalog:
51+
unsafe extern "C" fn(&Self, name: StabbyString) -> FfiOption<FFI_CatalogProvider>,
5452

5553
pub logical_codec: FFI_LogicalExtensionCodec,
5654

datafusion/ffi/src/physical_expr/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use datafusion_expr::statistics::Distribution;
3636
use datafusion_physical_expr::PhysicalExpr;
3737
use datafusion_physical_expr_common::physical_expr::fmt_sql;
3838

39-
4039
use stabby::string::String as StabbyString;
4140
use stabby::vec::Vec as StabbyVec;
4241

@@ -115,8 +114,7 @@ pub struct FFI_PhysicalExpr {
115114

116115
pub fmt_sql: unsafe extern "C" fn(&Self) -> FFIResult<StabbyString>,
117116

118-
pub snapshot:
119-
unsafe extern "C" fn(&Self) -> FFIResult<FfiOption<FFI_PhysicalExpr>>,
117+
pub snapshot: unsafe extern "C" fn(&Self) -> FFIResult<FfiOption<FFI_PhysicalExpr>>,
120118

121119
pub snapshot_generation: unsafe extern "C" fn(&Self) -> u64,
122120

datafusion/ffi/src/plan_properties.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ pub struct FFI_PlanProperties {
4747

4848
/// The output ordering of the plan.
4949
pub output_ordering:
50-
unsafe extern "C" fn(
51-
plan: &Self,
52-
) -> FfiOption<StabbyVec<FFI_PhysicalSortExpr>>,
50+
unsafe extern "C" fn(plan: &Self) -> FfiOption<StabbyVec<FFI_PhysicalSortExpr>>,
5351

5452
/// Return the schema of the plan.
5553
pub schema: unsafe extern "C" fn(plan: &Self) -> WrappedSchema,

datafusion/ffi/src/record_batch_stream.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use datafusion_common::{DataFusionError, Result, ffi_datafusion_err, ffi_err};
2525
use datafusion_execution::{RecordBatchStream, SendableRecordBatchStream};
2626
use futures::{Stream, TryStreamExt};
2727

28-
2928
use tokio::runtime::Handle;
3029

3130
use crate::arrow_wrappers::{WrappedArray, WrappedSchema};

datafusion/ffi/src/schema_provider.rs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,21 @@ pub struct FFI_SchemaProvider {
4747
pub table: unsafe extern "C" fn(
4848
provider: &Self,
4949
name: StabbyString,
50-
) -> FfiFuture<
51-
FFIResult<FfiOption<FFI_TableProvider>>,
52-
>,
53-
54-
pub register_table:
55-
unsafe extern "C" fn(
56-
provider: &Self,
57-
name: StabbyString,
58-
table: FFI_TableProvider,
59-
) -> FFIResult<FfiOption<FFI_TableProvider>>,
60-
61-
pub deregister_table:
62-
unsafe extern "C" fn(
63-
provider: &Self,
64-
name: StabbyString,
65-
) -> FFIResult<FfiOption<FFI_TableProvider>>,
50+
)
51+
-> FfiFuture<FFIResult<FfiOption<FFI_TableProvider>>>,
52+
53+
pub register_table: unsafe extern "C" fn(
54+
provider: &Self,
55+
name: StabbyString,
56+
table: FFI_TableProvider,
57+
)
58+
-> FFIResult<FfiOption<FFI_TableProvider>>,
59+
60+
pub deregister_table: unsafe extern "C" fn(
61+
provider: &Self,
62+
name: StabbyString,
63+
)
64+
-> FFIResult<FfiOption<FFI_TableProvider>>,
6665

6766
pub table_exist: unsafe extern "C" fn(provider: &Self, name: StabbyString) -> bool,
6867

datafusion/ffi/src/table_provider.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use datafusion_proto::logical_plan::{
3636
use datafusion_proto::protobuf::LogicalExprList;
3737
use prost::Message;
3838

39-
4039
use stabby::vec::Vec as StabbyVec;
4140
use tokio::runtime::Handle;
4241

@@ -46,7 +45,7 @@ use crate::arrow_wrappers::WrappedSchema;
4645
use crate::execution::FFI_TaskContextProvider;
4746
use crate::proto::logical_extension_codec::FFI_LogicalExtensionCodec;
4847
use crate::session::{FFI_SessionRef, ForeignSession};
49-
use crate::table_source::{FfiTableProviderFilterPushDown, FFI_TableType};
48+
use crate::table_source::{FFI_TableType, FfiTableProviderFilterPushDown};
5049
use crate::util::{FFIResult, FfiOption, FfiResult};
5150
use crate::{df_result, rresult_return};
5251

@@ -517,7 +516,10 @@ impl TableProvider for ForeignTableProvider {
517516
};
518517
let serialized_filters = expr_list.encode_to_vec();
519518

520-
let pushdowns = df_result!(pushdown_fn(&self.0, serialized_filters.into_iter().collect()))?;
519+
let pushdowns = df_result!(pushdown_fn(
520+
&self.0,
521+
serialized_filters.into_iter().collect()
522+
))?;
521523

522524
Ok(pushdowns.iter().map(|v| v.into()).collect())
523525
}

datafusion/ffi/src/table_provider_factory.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ pub struct FFI_TableProviderFactory {
6262
factory: &Self,
6363
session: FFI_SessionRef,
6464
cmd_serialized: StabbyVec<u8>,
65-
) -> FfiFuture<
66-
FFIResult<FFI_TableProvider>,
67-
>,
65+
) -> FfiFuture<FFIResult<FFI_TableProvider>>,
6866

6967
logical_codec: FFI_LogicalExtensionCodec,
7068

datafusion/ffi/src/udaf/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use datafusion_proto_common::from_proto::parse_proto_fields_to_fields;
3434
use groups_accumulator::FFI_GroupsAccumulator;
3535
use prost::{DecodeError, Message};
3636

37-
3837
use stabby::str::Str as StabbyStr;
3938
use stabby::string::String as StabbyString;
4039
use stabby::vec::Vec as StabbyVec;
@@ -44,8 +43,9 @@ use std::sync::Arc;
4443

4544
use crate::arrow_wrappers::WrappedSchema;
4645
use crate::util::{
47-
FFIResult, FfiOption, FfiResult, rvec_wrapped_to_vec_datatype, rvec_wrapped_to_vec_fieldref,
48-
vec_datatype_to_rvec_wrapped, vec_fieldref_to_rvec_wrapped,
46+
FFIResult, FfiOption, FfiResult, rvec_wrapped_to_vec_datatype,
47+
rvec_wrapped_to_vec_fieldref, vec_datatype_to_rvec_wrapped,
48+
vec_fieldref_to_rvec_wrapped,
4949
};
5050
use crate::volatility::FfiVolatility;
5151
use crate::{df_result, rresult, rresult_return};

datafusion/ffi/src/udf/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use return_type_args::{
3535
FFI_ReturnFieldArgs, ForeignReturnFieldArgs, ForeignReturnFieldArgsOwned,
3636
};
3737

38-
3938
use stabby::string::String as StabbyString;
4039
use stabby::vec::Vec as StabbyVec;
4140

0 commit comments

Comments
 (0)