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
4 changes: 2 additions & 2 deletions datafusion/core/src/execution/session_state_defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl SessionStateDefaults {

/// returns the list of default [`ScalarUDF`]s
pub fn default_scalar_functions() -> Vec<Arc<ScalarUDF>> {
#[cfg_attr(not(feature = "nested_expressions"), allow(unused_mut))]
#[cfg_attr(not(feature = "nested_expressions"), expect(unused_mut))]
let mut functions: Vec<Arc<ScalarUDF>> = functions::all_default_functions();

#[cfg(feature = "nested_expressions")]
Expand Down Expand Up @@ -155,7 +155,7 @@ impl SessionStateDefaults {
}

/// registers all the builtin array functions
#[cfg_attr(not(feature = "nested_expressions"), allow(unused_variables))]
#[cfg_attr(not(feature = "nested_expressions"), expect(unused_variables))]
pub fn register_array_functions(state: &mut SessionState) {
// register crate of array expressions (if enabled)
#[cfg(feature = "nested_expressions")]
Expand Down
1 change: 1 addition & 0 deletions datafusion/macros/src/user_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![deny(clippy::allow_attributes)]

extern crate proc_macro;
use datafusion_doc::scalar_doc_sections::doc_sections_const;
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/decorrelate_lateral_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use datafusion_expr::{LogicalPlan, LogicalPlanBuilder};
pub struct DecorrelateLateralJoin {}

impl DecorrelateLateralJoin {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self::default()
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/decorrelate_predicate_subquery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use log::debug;
pub struct DecorrelatePredicateSubquery {}

impl DecorrelatePredicateSubquery {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self::default()
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/eliminate_cross_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use datafusion_expr::{ExprSchemable, Operator, and, build_join_schema};
pub struct EliminateCrossJoin;

impl EliminateCrossJoin {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/eliminate_duplicated_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use indexmap::IndexSet;
pub struct EliminateDuplicatedExpr;

impl EliminateDuplicatedExpr {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/eliminate_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::{OptimizerConfig, OptimizerRule};
pub struct EliminateFilter;

impl EliminateFilter {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
4 changes: 2 additions & 2 deletions datafusion/optimizer/src/eliminate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::sync::Arc;
pub struct EliminateLimit;

impl EliminateLimit {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down Expand Up @@ -77,7 +77,7 @@ impl OptimizerRule for EliminateLimit {
} else if matches!(limit.get_skip_type()?, SkipType::Literal(0)) {
// If fetch is `None` and skip is 0, then Limit takes no effect and
// we can remove it. Its input also can be Limit, so we should apply again.
#[allow(clippy::used_underscore_binding)]
#[expect(clippy::used_underscore_binding)]
return self.rewrite(Arc::unwrap_or_clone(limit.input), _config);
}
Ok(Transformed::no(LogicalPlan::Limit(limit)))
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/eliminate_outer_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use std::sync::Arc;
pub struct EliminateOuterJoin;

impl EliminateOuterJoin {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/extract_equijoin_predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type EquijoinPredicate = (Expr, Expr);
pub struct ExtractEquijoinPredicate;

impl ExtractEquijoinPredicate {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
1 change: 1 addition & 0 deletions datafusion/optimizer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// Make sure fast / cheap clones on Arc are explicit:
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![deny(clippy::allow_attributes)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]

//! # DataFusion Optimizer
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/optimize_projections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ use datafusion_common::tree_node::{
pub struct OptimizeProjections {}

impl OptimizeProjections {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/optimize_unions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::sync::Arc;
pub struct OptimizeUnions;

impl OptimizeUnions {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/propagate_empty_relation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::{OptimizerConfig, OptimizerRule};
pub struct PropagateEmptyRelation;

impl PropagateEmptyRelation {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
8 changes: 4 additions & 4 deletions datafusion/optimizer/src/push_down_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,9 @@ impl OptimizerRule for PushDownFilter {
fn rewrite(
&self,
plan: LogicalPlan,
_config: &dyn OptimizerConfig,
config: &dyn OptimizerConfig,
) -> Result<Transformed<LogicalPlan>> {
let _ = config.options();
if let LogicalPlan::Join(join) = plan {
return push_down_join(join, None);
};
Expand Down Expand Up @@ -811,8 +812,7 @@ impl OptimizerRule for PushDownFilter {
new_predicate,
child_filter.input,
)?);
#[allow(clippy::used_underscore_binding)]
self.rewrite(new_filter, _config)
self.rewrite(new_filter, config)
}
LogicalPlan::Repartition(repartition) => {
let new_filter =
Expand Down Expand Up @@ -1378,7 +1378,7 @@ fn insert_below(
}

impl PushDownFilter {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
8 changes: 4 additions & 4 deletions datafusion/optimizer/src/push_down_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use datafusion_expr::{FetchType, SkipType, lit};
pub struct PushDownLimit {}

impl PushDownLimit {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand All @@ -50,8 +50,9 @@ impl OptimizerRule for PushDownLimit {
fn rewrite(
&self,
plan: LogicalPlan,
_config: &dyn OptimizerConfig,
config: &dyn OptimizerConfig,
) -> Result<Transformed<LogicalPlan>> {
let _ = config.options();
let LogicalPlan::Limit(mut limit) = plan else {
return Ok(Transformed::no(plan));
};
Expand Down Expand Up @@ -81,8 +82,7 @@ impl OptimizerRule for PushDownLimit {
});

// recursively reapply the rule on the new plan
#[allow(clippy::used_underscore_binding)]
return self.rewrite(plan, _config);
return self.rewrite(plan, config);
}

// no fetch to push, so return the original plan
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/replace_distinct_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ use datafusion_expr::{ExprFunctionExt, Limit, LogicalPlanBuilder, col, lit};
pub struct ReplaceDistinctWithAggregate {}

impl ReplaceDistinctWithAggregate {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/scalar_subquery_to_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use datafusion_expr::{EmptyRelation, Expr, LogicalPlan, LogicalPlanBuilder, expr
pub struct ScalarSubqueryToJoin {}

impl ScalarSubqueryToJoin {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self::default()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl<S: SimplifyInfo> ExprSimplifier<S> {
since = "48.0.0",
note = "Use `simplify_with_cycle_count_transformed` instead"
)]
#[allow(unused_mut)]
#[expect(unused_mut)]
pub fn simplify_with_cycle_count(&self, mut expr: Expr) -> Result<(Expr, u32)> {
let (transformed, cycle_count) =
self.simplify_with_cycle_count_transformed(expr)?;
Expand Down Expand Up @@ -496,7 +496,6 @@ impl TreeNodeRewriter for Canonicalizer {
}
}

#[allow(rustdoc::private_intra_doc_links)]
/// Partially evaluate `Expr`s so constant subtrees are evaluated at plan time.
///
/// Note it does not handle algebraic rewrites such as `(a or false)`
Expand All @@ -521,7 +520,6 @@ struct ConstEvaluator<'a> {
input_batch: RecordBatch,
}

#[allow(dead_code)]
/// The simplify result of ConstEvaluator
enum ConstSimplifyResult {
// Expr was simplified and contains the new expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl SimplifyExpressions {
}

impl SimplifyExpressions {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/src/single_distinct_to_groupby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct SingleDistinctToGroupBy {}
const SINGLE_DISTINCT_ALIAS: &str = "alias1";

impl SingleDistinctToGroupBy {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new() -> Self {
Self {}
}
Expand Down