Skip to content

Apache DataFusion SQL Query Engine

chore: enforce clippy::allow_attributes for datafusion-ffi crate (#19480)

chakkk309853273157086
diff --git a/datafusion/ffi/src/catalog_provider.rs b/datafusion/ffi/src/catalog_provider.rs
index 25e398c4dd..61e26f1663 100644
--- a/datafusion/ffi/src/catalog_provider.rs
+++ b/datafusion/ffi/src/catalog_provider.rs
@@ -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>,
diff --git a/datafusion/ffi/src/catalog_provider_list.rs b/datafusion/ffi/src/catalog_provider_list.rs
index c6ff5f7da7..40f8be3871 100644
--- a/datafusion/ffi/src/catalog_provider_list.rs
+++ b/datafusion/ffi/src/catalog_provider_list.rs
@@ -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(
diff --git a/datafusion/ffi/src/execution/task_ctx.rs b/datafusion/ffi/src/execution/task_ctx.rs
index 999a33bc1a..e0598db0a0 100644
--- a/datafusion/ffi/src/execution/task_ctx.rs
+++ b/datafusion/ffi/src/execution/task_ctx.rs
@@ -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,
diff --git a/datafusion/ffi/src/execution/task_ctx_provider.rs b/datafusion/ffi/src/execution/task_ctx_provider.rs
index e04080c0bc..5d4eaac839 100644
--- a/datafusion/ffi/src/execution/task_ctx_provider.rs
+++ b/datafusion/ffi/src/execution/task_ctx_provider.rs
@@ -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
diff --git a/datafusion/ffi/src/execution_plan.rs b/datafusion/ffi/src/execution_plan.rs
index b65355b39b..c879b02206 100644
--- a/datafusion/ffi/src/execution_plan.rs
+++ b/datafusion/ffi/src/execution_plan.rs
@@ -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,
diff --git a/datafusion/ffi/src/expr/columnar_value.rs b/datafusion/ffi/src/expr/columnar_value.rs
index 13f745f6de..7ad7645ecb 100644
--- a/datafusion/ffi/src/expr/columnar_value.rs
+++ b/datafusion/ffi/src/expr/columnar_value.rs
@@ -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),
diff --git a/datafusion/ffi/src/expr/distribution.rs b/datafusion/ffi/src/expr/distribution.rs
index 1a68fff152..b9ebfc2362 100644
--- a/datafusion/ffi/src/expr/distribution.rs
+++ b/datafusion/ffi/src/expr/distribution.rs
@@ -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),
@@ -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,
@@ -85,7 +82,6 @@ pub struct FFI_ExponentialDistribution {
#[repr(C)]
#[derive(Debug, StableAbi)]
-#[allow(non_camel_case_types)]
pub struct FFI_GaussianDistribution {
mean: WrappedArray,
variance: WrappedArray,
@@ -93,14 +89,12 @@ pub struct FFI_GaussianDistribution {
#[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,
diff --git a/datafusion/ffi/src/expr/expr_properties.rs b/datafusion/ffi/src/expr/expr_properties.rs
index a31bd34faa..199a399a64 100644
--- a/datafusion/ffi/src/expr/expr_properties.rs
+++ b/datafusion/ffi/src/expr/expr_properties.rs
@@ -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,
@@ -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,
@@ -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,
diff --git a/datafusion/ffi/src/expr/interval.rs b/datafusion/ffi/src/expr/interval.rs
index 8996b449b4..450f3747a5 100644
--- a/datafusion/ffi/src/expr/interval.rs
+++ b/datafusion/ffi/src/expr/interval.rs
@@ -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,
diff --git a/datafusion/ffi/src/insert_op.rs b/datafusion/ffi/src/insert_op.rs
index acba1aa2ae..6471039105 100644
--- a/datafusion/ffi/src/insert_op.rs
+++ b/datafusion/ffi/src/insert_op.rs
@@ -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,
diff --git a/datafusion/ffi/src/lib.rs b/datafusion/ffi/src/lib.rs
index 2ca9b8f6f4..bf0cf9b122 100644
--- a/datafusion/ffi/src/lib.rs
+++ b/datafusion/ffi/src/lib.rs
@@ -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;
diff --git a/datafusion/ffi/src/physical_expr/mod.rs b/datafusion/ffi/src/physical_expr/mod.rs
index c8d3e3e9a5..d268dd613f 100644
--- a/datafusion/ffi/src/physical_expr/mod.rs
+++ b/datafusion/ffi/src/physical_expr/mod.rs
@@ -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,
diff --git a/datafusion/ffi/src/physical_expr/partitioning.rs b/datafusion/ffi/src/physical_expr/partitioning.rs
index ed755d7ebe..cda4fd2c97 100644
--- a/datafusion/ffi/src/physical_expr/partitioning.rs
+++ b/datafusion/ffi/src/physical_expr/partitioning.rs
@@ -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),
diff --git a/datafusion/ffi/src/physical_expr/sort.rs b/datafusion/ffi/src/physical_expr/sort.rs
index 58a06e7fcd..fd3339b105 100644
--- a/datafusion/ffi/src/physical_expr/sort.rs
+++ b/datafusion/ffi/src/physical_expr/sort.rs
@@ -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,
diff --git a/datafusion/ffi/src/plan_properties.rs b/datafusion/ffi/src/plan_properties.rs
index ac388a3653..d009de3f04 100644
--- a/datafusion/ffi/src/plan_properties.rs
+++ b/datafusion/ffi/src/plan_properties.rs
@@ -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,
@@ -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,
@@ -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,
diff --git a/datafusion/ffi/src/proto/logical_extension_codec.rs b/datafusion/ffi/src/proto/logical_extension_codec.rs
index 3cb62f4a53..3781a40539 100644
--- a/datafusion/ffi/src/proto/logical_extension_codec.rs
+++ b/datafusion/ffi/src/proto/logical_extension_codec.rs
@@ -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(
diff --git a/datafusion/ffi/src/proto/physical_extension_codec.rs b/datafusion/ffi/src/proto/physical_extension_codec.rs
index 5025c962d3..0577e72366 100644
--- a/datafusion/ffi/src/proto/physical_extension_codec.rs
+++ b/datafusion/ffi/src/proto/physical_extension_codec.rs
@@ -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(
diff --git a/datafusion/ffi/src/record_batch_stream.rs b/datafusion/ffi/src/record_batch_stream.rs
index 7063d7e8c3..73bfb9ddc8 100644
--- a/datafusion/ffi/src/record_batch_stream.rs
+++ b/datafusion/ffi/src/record_batch_stream.rs
@@ -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.
diff --git a/datafusion/ffi/src/schema_provider.rs b/datafusion/ffi/src/schema_provider.rs
index 84cff6e8b3..b8e44b134f 100644
--- a/datafusion/ffi/src/schema_provider.rs
+++ b/datafusion/ffi/src/schema_provider.rs
@@ -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>,
diff --git a/datafusion/ffi/src/session/config.rs b/datafusion/ffi/src/session/config.rs
index da026bbd8c..eb9c4e2c69 100644
--- a/datafusion/ffi/src/session/config.rs
+++ b/datafusion/ffi/src/session/config.rs
@@ -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.
diff --git a/datafusion/ffi/src/session/mod.rs b/datafusion/ffi/src/session/mod.rs
index 4cb33f7d44..aa910abb91 100644
--- a/datafusion/ffi/src/session/mod.rs
+++ b/datafusion/ffi/src/session/mod.rs
@@ -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,
diff --git a/datafusion/ffi/src/table_provider.rs b/datafusion/ffi/src/table_provider.rs
index a5f9940128..df8b648026 100644
--- a/datafusion/ffi/src/table_provider.rs
+++ b/datafusion/ffi/src/table_provider.rs
@@ -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,
diff --git a/datafusion/ffi/src/table_source.rs b/datafusion/ffi/src/table_source.rs
index 6cd8f1efa7..2f17d9235a 100644
--- a/datafusion/ffi/src/table_source.rs
+++ b/datafusion/ffi/src/table_source.rs
@@ -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,
@@ -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,
diff --git a/datafusion/ffi/src/tests/async_provider.rs b/datafusion/ffi/src/tests/async_provider.rs
index 2d098f8adf..6149736c58 100644
--- a/datafusion/ffi/src/tests/async_provider.rs
+++ b/datafusion/ffi/src/tests/async_provider.rs
@@ -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
diff --git a/datafusion/ffi/src/udaf/accumulator.rs b/datafusion/ffi/src/udaf/accumulator.rs
index 44bfc5bdeb..6d2b86a3f2 100644
--- a/datafusion/ffi/src/udaf/accumulator.rs
+++ b/datafusion/ffi/src/udaf/accumulator.rs
@@ -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,
diff --git a/datafusion/ffi/src/udaf/accumulator_args.rs b/datafusion/ffi/src/udaf/accumulator_args.rs
index 5bb0f2103f..a335923107 100644
--- a/datafusion/ffi/src/udaf/accumulator_args.rs
+++ b/datafusion/ffi/src/udaf/accumulator_args.rs
@@ -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,
diff --git a/datafusion/ffi/src/udaf/groups_accumulator.rs b/datafusion/ffi/src/udaf/groups_accumulator.rs
index 73a6befd81..fc4ce4b8ba 100644
--- a/datafusion/ffi/src/udaf/groups_accumulator.rs
+++ b/datafusion/ffi/src/udaf/groups_accumulator.rs
@@ -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,
@@ -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),
diff --git a/datafusion/ffi/src/udaf/mod.rs b/datafusion/ffi/src/udaf/mod.rs
index 9711dd7fd2..c485c9a71b 100644
--- a/datafusion/ffi/src/udaf/mod.rs
+++ b/datafusion/ffi/src/udaf/mod.rs
@@ -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,
@@ -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,
@@ -612,7 +610,6 @@ impl AggregateUDFImpl for ForeignAggregateUDF {
#[repr(C)]
#[derive(Debug, StableAbi)]
-#[allow(non_camel_case_types)]
pub enum FFI_AggregateOrderSensitivity {
Insensitive,
HardRequirement,
diff --git a/datafusion/ffi/src/udf/mod.rs b/datafusion/ffi/src/udf/mod.rs
index 0b2efd45c1..d7da050b35 100644
--- a/datafusion/ffi/src/udf/mod.rs
+++ b/datafusion/ffi/src/udf/mod.rs
@@ -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,
@@ -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>,
diff --git a/datafusion/ffi/src/udf/return_type_args.rs b/datafusion/ffi/src/udf/return_type_args.rs
index 554b0a1eee..8fb015b7ed 100644
--- a/datafusion/ffi/src/udf/return_type_args.rs
+++ b/datafusion/ffi/src/udf/return_type_args.rs
@@ -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>>>,
diff --git a/datafusion/ffi/src/udtf.rs b/datafusion/ffi/src/udtf.rs
index bd35839d96..6024ec755d 100644
--- a/datafusion/ffi/src/udtf.rs
+++ b/datafusion/ffi/src/udtf.rs
@@ -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.
diff --git a/datafusion/ffi/src/udwf/mod.rs b/datafusion/ffi/src/udwf/mod.rs
index e4ac97f5d4..53aa6c34eb 100644
--- a/datafusion/ffi/src/udwf/mod.rs
+++ b/datafusion/ffi/src/udwf/mod.rs
@@ -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,
@@ -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,
diff --git a/datafusion/ffi/src/udwf/partition_evaluator.rs b/datafusion/ffi/src/udwf/partition_evaluator.rs
index 70149efeb1..8df02511aa 100644
--- a/datafusion/ffi/src/udwf/partition_evaluator.rs
+++ b/datafusion/ffi/src/udwf/partition_evaluator.rs
@@ -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,
diff --git a/datafusion/ffi/src/udwf/partition_evaluator_args.rs b/datafusion/ffi/src/udwf/partition_evaluator_args.rs
index dca53a7a34..ffad1f41ee 100644
--- a/datafusion/ffi/src/udwf/partition_evaluator_args.rs
+++ b/datafusion/ffi/src/udwf/partition_evaluator_args.rs
@@ -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>,
diff --git a/datafusion/ffi/src/udwf/range.rs b/datafusion/ffi/src/udwf/range.rs
index 1ddcc4199f..19a908c5e2 100644
--- a/datafusion/ffi/src/udwf/range.rs
+++ b/datafusion/ffi/src/udwf/range.rs
@@ -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,
diff --git a/datafusion/ffi/src/volatility.rs b/datafusion/ffi/src/volatility.rs
index a3faf8098b..bc714ae595 100644
--- a/datafusion/ffi/src/volatility.rs
+++ b/datafusion/ffi/src/volatility.rs
@@ -20,7 +20,6 @@ use datafusion_expr::Volatility;
#[repr(C)]
#[derive(Debug, StableAbi, Clone)]
-#[allow(non_camel_case_types)]
pub enum FFI_Volatility {
Immutable,
Stable,