Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion datafusion/ffi/src/catalog_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use crate::{df_result, rresult_return};
/// A stable struct for sharing [`CatalogProvider`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_CatalogProvider {
pub schema_names: unsafe extern "C" fn(provider: &Self) -> RVec<RString>,

Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/catalog_provider_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use crate::proto::logical_extension_codec::FFI_LogicalExtensionCodec;
/// A stable struct for sharing [`CatalogProviderList`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_CatalogProviderList {
/// Register a catalog
pub register_catalog: unsafe extern "C" fn(
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/execution/task_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::udwf::FFI_WindowUDF;
/// A stable struct for sharing [`TaskContext`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_TaskContext {
/// Return the session ID.
pub session_id: unsafe extern "C" fn(&Self) -> RString,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/execution/task_ctx_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use crate::{df_result, rresult};
/// additional information.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_TaskContextProvider {
/// Retrieve the current [`TaskContext`] provided the provider has not
/// gone out of scope. This function will return an error if the weakly
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/execution_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use crate::{df_result, rresult};
/// A stable struct for sharing a [`ExecutionPlan`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_ExecutionPlan {
/// Return the plan properties
pub properties: unsafe extern "C" fn(plan: &Self) -> FFI_PlanProperties,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/expr/columnar_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use crate::arrow_wrappers::WrappedArray;
/// Scalar values are passed as an Arrow array of length 1.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_ColumnarValue {
Array(WrappedArray),
Scalar(WrappedArray),
Expand Down
6 changes: 0 additions & 6 deletions datafusion/ffi/src/expr/distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use crate::expr::interval::FFI_Interval;
/// See ['Distribution'] for the meaning of each variant.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
#[expect(clippy::large_enum_variant)]
pub enum FFI_Distribution {
Uniform(FFI_UniformDistribution),
Expand Down Expand Up @@ -69,14 +68,12 @@ impl TryFrom<FFI_Distribution> for Distribution {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_UniformDistribution {
interval: FFI_Interval,
}

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_ExponentialDistribution {
rate: WrappedArray,
offset: WrappedArray,
Expand All @@ -85,22 +82,19 @@ pub struct FFI_ExponentialDistribution {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_GaussianDistribution {
mean: WrappedArray,
variance: WrappedArray,
}

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_BernoulliDistribution {
p: WrappedArray,
}

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_GenericDistribution {
mean: WrappedArray,
median: WrappedArray,
Expand Down
3 changes: 0 additions & 3 deletions datafusion/ffi/src/expr/expr_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::expr::interval::FFI_Interval;
/// See [`ExprProperties`] for the meaning of each field.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_ExprProperties {
sort_properties: FFI_SortProperties,
range: FFI_Interval,
Expand Down Expand Up @@ -62,7 +61,6 @@ impl TryFrom<FFI_ExprProperties> for ExprProperties {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_SortProperties {
Ordered(FFI_SortOptions),
Unordered,
Expand Down Expand Up @@ -91,7 +89,6 @@ impl From<&FFI_SortProperties> for SortProperties {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_SortOptions {
pub descending: bool,
pub nulls_first: bool,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/expr/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::arrow_wrappers::WrappedArray;
/// are passed as Arrow arrays of length 1.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_Interval {
lower: WrappedArray,
upper: WrappedArray,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/insert_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use datafusion_expr::logical_plan::dml::InsertOp;
/// FFI safe version of [`InsertOp`].
#[repr(C)]
#[derive(StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_InsertOp {
Append,
Overwrite,
Expand Down
1 change: 1 addition & 0 deletions datafusion/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]

pub mod arrow_wrappers;
pub mod catalog_provider;
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/physical_expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use crate::{df_result, rresult, rresult_return};

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PhysicalExpr {
pub data_type: unsafe extern "C" fn(
&Self,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/physical_expr/partitioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use crate::physical_expr::FFI_PhysicalExpr;
/// See ['Partitioning'] for the meaning of each variant.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_Partitioning {
RoundRobinBatch(usize),
Hash(RVec<FFI_PhysicalExpr>, usize),
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/physical_expr/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use crate::physical_expr::FFI_PhysicalExpr;
/// See [`PhysicalSortExpr`] for the meaning of each field.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PhysicalSortExpr {
expr: FFI_PhysicalExpr,
options: FFI_SortOptions,
Expand Down
3 changes: 0 additions & 3 deletions datafusion/ffi/src/plan_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use crate::physical_expr::sort::FFI_PhysicalSortExpr;
/// A stable struct for sharing [`PlanProperties`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PlanProperties {
/// The output partitioning of the plan.
pub output_partitioning: unsafe extern "C" fn(plan: &Self) -> FFI_Partitioning,
Expand Down Expand Up @@ -196,7 +195,6 @@ impl TryFrom<FFI_PlanProperties> for PlanProperties {

/// FFI safe version of [`Boundedness`].
#[repr(C)]
#[allow(non_camel_case_types)]
#[derive(Clone, StableAbi)]
pub enum FFI_Boundedness {
Bounded,
Expand Down Expand Up @@ -231,7 +229,6 @@ impl From<FFI_Boundedness> for Boundedness {

/// FFI safe version of [`EmissionType`].
#[repr(C)]
#[allow(non_camel_case_types)]
#[derive(Clone, StableAbi)]
pub enum FFI_EmissionType {
Incremental,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/proto/logical_extension_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ use crate::{df_result, rresult_return};
/// A stable struct for sharing [`LogicalExtensionCodec`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_LogicalExtensionCodec {
/// Decode bytes into a table provider.
try_decode_table_provider: unsafe extern "C" fn(
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/proto/physical_extension_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ use crate::{df_result, rresult_return};
/// A stable struct for sharing [`PhysicalExtensionCodec`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PhysicalExtensionCodec {
/// Decode bytes into an execution plan.
try_decode: unsafe extern "C" fn(
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/record_batch_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::util::FFIResult;
/// We use the async-ffi crate for handling async calls across libraries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_RecordBatchStream {
/// This mirrors the `poll_next` of [`RecordBatchStream`] but does so
/// in a FFI safe manner.
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/schema_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use crate::{df_result, rresult_return};
/// A stable struct for sharing [`SchemaProvider`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_SchemaProvider {
pub owner_name: ROption<RString>,

Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use datafusion_execution::config::SessionConfig;
/// value over this version.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_SessionConfig {
/// Return a hash map from key to value of the config options represented
/// by string values.
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ pub mod config;
/// we know the [`Session`] lifetimes are valid.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub(crate) struct FFI_SessionRef {
session_id: unsafe extern "C" fn(&Self) -> RStr,

Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/table_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ use crate::{df_result, rresult_return};
/// side of the interface each object refers to.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_TableProvider {
/// Return the table schema
schema: unsafe extern "C" fn(provider: &Self) -> WrappedSchema,
Expand Down
2 changes: 0 additions & 2 deletions datafusion/ffi/src/table_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use datafusion_expr::{TableProviderFilterPushDown, TableType};
/// FFI safe version of [`TableProviderFilterPushDown`].
#[repr(C)]
#[derive(StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_TableProviderFilterPushDown {
Unsupported,
Inexact,
Expand Down Expand Up @@ -58,7 +57,6 @@ impl From<&TableProviderFilterPushDown> for FFI_TableProviderFilterPushDown {

/// FFI safe version of [`TableType`].
#[repr(C)]
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, StableAbi)]
pub enum FFI_TableType {
Base,
Expand Down
2 changes: 1 addition & 1 deletion datafusion/ffi/src/tests/async_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl Stream for AsyncTestRecordBatchStream {
) -> std::task::Poll<Option<Self::Item>> {
let mut this = self.as_mut();

#[allow(clippy::disallowed_methods)]
#[expect(clippy::disallowed_methods)]
tokio::spawn(async move {
// Nothing to do. We just need to simulate an async
// task running
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udaf/accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use crate::{df_result, rresult, rresult_return};
/// defined in [`Accumulator`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_Accumulator {
pub update_batch: unsafe extern "C" fn(
accumulator: &mut Self,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udaf/accumulator_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::util::{rvec_wrapped_to_vec_fieldref, vec_fieldref_to_rvec_wrapped};
/// defined in [`AccumulatorArgs`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_AccumulatorArgs {
return_field: WrappedSchema,
schema: WrappedSchema,
Expand Down
2 changes: 0 additions & 2 deletions datafusion/ffi/src/udaf/groups_accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use crate::{df_result, rresult, rresult_return};
/// defined in [`GroupsAccumulator`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_GroupsAccumulator {
pub update_batch: unsafe extern "C" fn(
accumulator: &mut Self,
Expand Down Expand Up @@ -438,7 +437,6 @@ impl GroupsAccumulator for ForeignGroupsAccumulator {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_EmitTo {
All,
First(usize),
Expand Down
3 changes: 0 additions & 3 deletions datafusion/ffi/src/udaf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ mod groups_accumulator;
/// A stable struct for sharing a [`AggregateUDF`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_AggregateUDF {
/// FFI equivalent to the `name` of a [`AggregateUDF`]
pub name: RString,
Expand Down Expand Up @@ -94,7 +93,6 @@ pub struct FFI_AggregateUDF {
-> FFIResult<FFI_Accumulator>,

/// FFI equivalent to [`AggregateUDF::state_fields`]
#[allow(clippy::type_complexity)]
pub state_fields: unsafe extern "C" fn(
udaf: &FFI_AggregateUDF,
name: &RStr,
Expand Down Expand Up @@ -612,7 +610,6 @@ impl AggregateUDFImpl for ForeignAggregateUDF {

#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub enum FFI_AggregateOrderSensitivity {
Insensitive,
HardRequirement,
Expand Down
2 changes: 0 additions & 2 deletions datafusion/ffi/src/udf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pub mod return_type_args;
/// A stable struct for sharing a [`ScalarUDF`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_ScalarUDF {
/// FFI equivalent to the `name` of a [`ScalarUDF`]
pub name: RString,
Expand All @@ -68,7 +67,6 @@ pub struct FFI_ScalarUDF {

/// Execute the underlying [`ScalarUDF`] and return the result as a `FFI_ArrowArray`
/// within an AbiStable wrapper.
#[allow(clippy::type_complexity)]
pub invoke_with_args: unsafe extern "C" fn(
udf: &Self,
args: RVec<WrappedArray>,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udf/return_type_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use crate::util::{rvec_wrapped_to_vec_fieldref, vec_fieldref_to_rvec_wrapped};
/// A stable struct for sharing a [`ReturnFieldArgs`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_ReturnFieldArgs {
arg_fields: RVec<WrappedSchema>,
scalar_arguments: RVec<ROption<RVec<u8>>>,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udtf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ use crate::{df_result, rresult_return};
/// A stable struct for sharing a [`TableFunctionImpl`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_TableFunction {
/// Equivalent to the `call` function of the TableFunctionImpl.
/// The arguments are Expr passed as protobuf encoded bytes.
Expand Down
2 changes: 0 additions & 2 deletions datafusion/ffi/src/udwf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use crate::{df_result, rresult, rresult_return};
/// A stable struct for sharing a [`WindowUDF`] across FFI boundaries.
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_WindowUDF {
/// FFI equivalent to the `name` of a [`WindowUDF`]
pub name: RString,
Expand Down Expand Up @@ -370,7 +369,6 @@ impl WindowUDFImpl for ForeignWindowUDF {

#[repr(C)]
#[derive(Debug, StableAbi, Clone)]
#[allow(non_camel_case_types)]
pub struct FFI_SortOptions {
pub descending: bool,
pub nulls_first: bool,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udwf/partition_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ use crate::{df_result, rresult, rresult_return};
/// defined in [`PartitionEvaluator`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PartitionEvaluator {
pub evaluate_all: unsafe extern "C" fn(
evaluator: &mut Self,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udwf/partition_evaluator_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use crate::util::rvec_wrapped_to_vec_fieldref;
/// defined in [`PartitionEvaluatorArgs`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_PartitionEvaluatorArgs {
input_exprs: RVec<FFI_PhysicalExpr>,
input_fields: RVec<WrappedSchema>,
Expand Down
1 change: 0 additions & 1 deletion datafusion/ffi/src/udwf/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use abi_stable::StableAbi;
/// defined in [`Range`].
#[repr(C)]
#[derive(Debug, StableAbi)]
#[allow(non_camel_case_types)]
pub struct FFI_Range {
pub start: usize,
pub end: usize,
Expand Down
Loading