This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 4088192fc8 chore: enforce clippy::allow_attributes for
spark,sql,sustrait (#19309)
4088192fc8 is described below
commit 4088192fc87ef3c27d338dc7805a125332b04a3e
Author: Kumar Ujjawal <[email protected]>
AuthorDate: Sun Dec 14 09:16:14 2025 +0530
chore: enforce clippy::allow_attributes for spark,sql,sustrait (#19309)
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->
- Part of #18881 .
## Rationale for this change
We want to use `#[expect]` in place of `#[allow]` on the workspace level
but to get there we wanted to do this in few crates at a time before
enabling it in workspace.
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
Atrribute changes for the:
- datafusion-spark
- datafusion-sql
- datafusion-substrait
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
## Are these changes tested?
Yes
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
---
datafusion/spark/src/function/hash/sha1.rs | 1 -
datafusion/spark/src/lib.rs | 3 ++-
datafusion/sql/src/expr/mod.rs | 2 +-
datafusion/sql/src/expr/value.rs | 2 +-
datafusion/sql/src/lib.rs | 1 +
datafusion/sql/src/select.rs | 2 +-
datafusion/sql/src/unparser/ast.rs | 10 +---------
datafusion/sql/src/unparser/extension_unparser.rs | 2 +-
datafusion/substrait/src/extensions.rs | 2 +-
datafusion/substrait/src/lib.rs | 1 +
datafusion/substrait/src/logical_plan/consumer/expr/literal.rs | 8 ++++----
.../substrait/src/logical_plan/consumer/rel/aggregate_rel.rs | 2 +-
datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs | 2 +-
datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs | 4 ++--
datafusion/substrait/src/logical_plan/consumer/types.rs | 8 ++++----
.../src/logical_plan/producer/expr/aggregate_function.rs | 2 +-
datafusion/substrait/src/logical_plan/producer/expr/mod.rs | 2 +-
.../src/logical_plan/producer/expr/scalar_function.rs | 8 ++++----
.../src/logical_plan/producer/expr/singular_or_list.rs | 2 +-
.../substrait/src/logical_plan/producer/expr/subquery.rs | 2 +-
.../src/logical_plan/producer/expr/window_function.rs | 2 +-
datafusion/substrait/src/logical_plan/producer/plan.rs | 2 +-
.../substrait/src/logical_plan/producer/rel/aggregate_rel.rs | 4 ++--
datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs | 7 +++----
datafusion/substrait/tests/utils.rs | 2 +-
25 files changed, 38 insertions(+), 45 deletions(-)
diff --git a/datafusion/spark/src/function/hash/sha1.rs
b/datafusion/spark/src/function/hash/sha1.rs
index 9e3d96b803..4553089472 100644
--- a/datafusion/spark/src/function/hash/sha1.rs
+++ b/datafusion/spark/src/function/hash/sha1.rs
@@ -93,7 +93,6 @@ impl ScalarUDFImpl for SparkSha1 {
fn spark_sha1_digest(value: &[u8]) -> String {
let result = Sha1::digest(value);
let mut s = String::with_capacity(result.len() * 2);
- #[allow(deprecated)]
for b in result.as_slice() {
write!(&mut s, "{b:02x}").unwrap();
}
diff --git a/datafusion/spark/src/lib.rs b/datafusion/spark/src/lib.rs
index 1e32ff8cb6..a3c3f392a0 100644
--- a/datafusion/spark/src/lib.rs
+++ b/datafusion/spark/src/lib.rs
@@ -22,6 +22,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
// Make cheap clones clear: 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))]
//! Spark Expression packages for [DataFusion].
@@ -103,7 +104,7 @@ use log::debug;
use std::sync::Arc;
/// Fluent-style API for creating `Expr`s
-#[allow(unused)]
+#[expect(unused_imports)]
pub mod expr_fn {
pub use super::function::aggregate::expr_fn::*;
pub use super::function::array::expr_fn::*;
diff --git a/datafusion/sql/src/expr/mod.rs b/datafusion/sql/src/expr/mod.rs
index 83893e82c2..fcd7d6376d 100644
--- a/datafusion/sql/src/expr/mod.rs
+++ b/datafusion/sql/src/expr/mod.rs
@@ -835,7 +835,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
)))
}
- #[allow(clippy::too_many_arguments)]
+ #[expect(clippy::too_many_arguments)]
fn sql_like_to_expr(
&self,
negated: bool,
diff --git a/datafusion/sql/src/expr/value.rs b/datafusion/sql/src/expr/value.rs
index ad057ba4c6..fa7dd7498d 100644
--- a/datafusion/sql/src/expr/value.rs
+++ b/datafusion/sql/src/expr/value.rs
@@ -186,7 +186,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
/// Convert a SQL interval expression to a DataFusion logical plan
/// expression
- #[allow(clippy::only_used_in_recursion)]
+ #[expect(clippy::only_used_in_recursion)]
pub(super) fn sql_interval_to_expr(
&self,
negative: bool,
diff --git a/datafusion/sql/src/lib.rs b/datafusion/sql/src/lib.rs
index 7fef670933..b21eb52920 100644
--- a/datafusion/sql/src/lib.rs
+++ b/datafusion/sql/src/lib.rs
@@ -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))]
//! This crate provides:
diff --git a/datafusion/sql/src/select.rs b/datafusion/sql/src/select.rs
index c5a635cac9..cbcc6c3e10 100644
--- a/datafusion/sql/src/select.rs
+++ b/datafusion/sql/src/select.rs
@@ -917,7 +917,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
/// the aggregate
/// * `order_by_post_aggr` - The ORDER BY expressions rewritten to
reference columns from
/// the aggregate
- #[allow(clippy::too_many_arguments)]
+ #[expect(clippy::too_many_arguments)]
fn aggregate(
&self,
input: &LogicalPlan,
diff --git a/datafusion/sql/src/unparser/ast.rs
b/datafusion/sql/src/unparser/ast.rs
index 87250f1646..586ecea328 100644
--- a/datafusion/sql/src/unparser/ast.rs
+++ b/datafusion/sql/src/unparser/ast.rs
@@ -38,7 +38,6 @@ pub struct QueryBuilder {
distinct_union: bool,
}
-#[allow(dead_code)]
impl QueryBuilder {
pub fn with(&mut self, value: Option<ast::With>) -> &mut Self {
self.with = value;
@@ -156,7 +155,6 @@ pub struct SelectBuilder {
flavor: Option<SelectFlavor>,
}
-#[allow(dead_code)]
impl SelectBuilder {
pub fn distinct(&mut self, value: Option<ast::Distinct>) -> &mut Self {
self.distinct = value;
@@ -356,7 +354,6 @@ pub struct TableWithJoinsBuilder {
joins: Vec<ast::Join>,
}
-#[allow(dead_code)]
impl TableWithJoinsBuilder {
pub fn relation(&mut self, value: RelationBuilder) -> &mut Self {
self.relation = Some(value);
@@ -402,9 +399,8 @@ pub struct RelationBuilder {
relation: Option<TableFactorBuilder>,
}
-#[allow(dead_code)]
#[derive(Clone)]
-#[allow(clippy::large_enum_variant)]
+#[expect(clippy::large_enum_variant)]
enum TableFactorBuilder {
Table(TableRelationBuilder),
Derived(DerivedRelationBuilder),
@@ -412,7 +408,6 @@ enum TableFactorBuilder {
Empty,
}
-#[allow(dead_code)]
impl RelationBuilder {
pub fn has_relation(&self) -> bool {
self.relation.is_some()
@@ -484,7 +479,6 @@ pub struct TableRelationBuilder {
index_hints: Vec<ast::TableIndexHints>,
}
-#[allow(dead_code)]
impl TableRelationBuilder {
pub fn name(&mut self, value: ast::ObjectName) -> &mut Self {
self.name = Some(value);
@@ -558,7 +552,6 @@ pub struct DerivedRelationBuilder {
alias: Option<ast::TableAlias>,
}
-#[allow(dead_code)]
impl DerivedRelationBuilder {
pub fn lateral(&mut self, value: bool) -> &mut Self {
self.lateral = Some(value);
@@ -610,7 +603,6 @@ pub struct UnnestRelationBuilder {
with_ordinality: bool,
}
-#[allow(dead_code)]
impl UnnestRelationBuilder {
pub fn alias(&mut self, value: Option<ast::TableAlias>) -> &mut Self {
self.alias = value;
diff --git a/datafusion/sql/src/unparser/extension_unparser.rs
b/datafusion/sql/src/unparser/extension_unparser.rs
index f38cd1db63..6633b38cf2 100644
--- a/datafusion/sql/src/unparser/extension_unparser.rs
+++ b/datafusion/sql/src/unparser/extension_unparser.rs
@@ -64,7 +64,7 @@ pub enum UnparseWithinStatementResult {
}
/// The result of unparsing a custom logical node to a statement.
-#[allow(clippy::large_enum_variant)]
+#[expect(clippy::large_enum_variant)]
pub enum UnparseToStatementResult {
/// If the custom logical node was successfully unparsed to a statement.
Modified(Statement),
diff --git a/datafusion/substrait/src/extensions.rs
b/datafusion/substrait/src/extensions.rs
index 27d6c15030..45da9eaea6 100644
--- a/datafusion/substrait/src/extensions.rs
+++ b/datafusion/substrait/src/extensions.rs
@@ -115,7 +115,7 @@ impl TryFrom<&Vec<SimpleExtensionDeclaration>> for
Extensions {
impl From<Extensions> for Vec<SimpleExtensionDeclaration> {
// Silence deprecation warnings for `extension_uri_reference` during the
uri -> urn migration
// See: https://github.com/substrait-io/substrait/issues/856
- #[allow(deprecated)]
+ #[expect(deprecated)]
fn from(val: Extensions) -> Vec<SimpleExtensionDeclaration> {
let mut extensions = vec![];
for (f_anchor, f_name) in val.functions {
diff --git a/datafusion/substrait/src/lib.rs b/datafusion/substrait/src/lib.rs
index 0819fd3a59..407408aaa7 100644
--- a/datafusion/substrait/src/lib.rs
+++ b/datafusion/substrait/src/lib.rs
@@ -23,6 +23,7 @@
// Make sure fast / cheap clones on Arc are explicit:
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
+#![deny(clippy::allow_attributes)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
//! Serialize / Deserialize DataFusion Plans to [Substrait.io]
diff --git a/datafusion/substrait/src/logical_plan/consumer/expr/literal.rs
b/datafusion/substrait/src/logical_plan/consumer/expr/literal.rs
index eb3d345dc0..e2989b3b98 100644
--- a/datafusion/substrait/src/logical_plan/consumer/expr/literal.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/expr/literal.rs
@@ -19,7 +19,7 @@ use crate::logical_plan::consumer::types::from_substrait_type;
use crate::logical_plan::consumer::utils::{next_struct_field_name,
DEFAULT_TIMEZONE};
use crate::logical_plan::consumer::SubstraitConsumer;
use crate::variation_const::FLOAT_16_TYPE_NAME;
-#[allow(deprecated)]
+#[expect(deprecated)]
use crate::variation_const::{
DEFAULT_CONTAINER_TYPE_VARIATION_REF, DEFAULT_TYPE_VARIATION_REF,
INTERVAL_DAY_TIME_TYPE_REF, INTERVAL_MONTH_DAY_NANO_TYPE_NAME,
@@ -104,7 +104,7 @@ pub(crate) fn from_substrait_literal(
Some(LiteralType::Fp64(f)) => ScalarValue::Float64(Some(*f)),
Some(LiteralType::Timestamp(t)) => {
// Kept for backwards compatibility, new plans should use
PrecisionTimestamp(Tz) instead
- #[allow(deprecated)]
+ #[expect(deprecated)]
match lit.type_variation_reference {
TIMESTAMP_SECOND_TYPE_VARIATION_REF => {
ScalarValue::TimestampSecond(Some(*t), None)
@@ -505,7 +505,7 @@ pub(crate) fn from_substrait_literal(
return Ok(ScalarValue::Float16(Some(f16_val)));
}
// Kept for backwards compatibility - producers should use
IntervalCompound instead
- #[allow(deprecated)]
+ #[expect(deprecated)]
INTERVAL_MONTH_DAY_NANO_TYPE_NAME => {
interval_month_day_nano(user_defined)?
}
@@ -518,7 +518,7 @@ pub(crate) fn from_substrait_literal(
}
}
} else {
- #[allow(deprecated)]
+ #[expect(deprecated)]
match user_defined.type_reference {
// Kept for backwards compatibility, producers should
useIntervalYearToMonth instead
INTERVAL_YEAR_MONTH_TYPE_REF => {
diff --git
a/datafusion/substrait/src/logical_plan/consumer/rel/aggregate_rel.rs
b/datafusion/substrait/src/logical_plan/consumer/rel/aggregate_rel.rs
index fce074cd51..260f8b2969 100644
--- a/datafusion/substrait/src/logical_plan/consumer/rel/aggregate_rel.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/rel/aggregate_rel.rs
@@ -122,7 +122,7 @@ pub async fn from_aggregate_rel(
}
}
-#[allow(deprecated)]
+#[expect(deprecated)]
async fn from_substrait_grouping(
consumer: &impl SubstraitConsumer,
grouping: &Grouping,
diff --git a/datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs
b/datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs
index 5681c92326..3af9cd7bd6 100644
--- a/datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs
@@ -98,7 +98,7 @@ fn split_eq_and_noneq_join_predicate_with_nulls_equality(
let mut nulls_equal_nulls = false;
for expr in exprs {
- #[allow(clippy::collapsible_match)]
+ #[expect(clippy::collapsible_match)]
match expr {
Expr::BinaryExpr(binary_expr) => match binary_expr {
x @ (BinaryExpr {
diff --git a/datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs
b/datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs
index f4d455fba3..9d11e278f7 100644
--- a/datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs
@@ -35,7 +35,7 @@ use substrait::proto::read_rel::ReadType;
use substrait::proto::{Expression, ReadRel};
use url::Url;
-#[allow(deprecated)]
+#[expect(deprecated)]
pub async fn from_read_rel(
consumer: &impl SubstraitConsumer,
read: &ReadRel,
@@ -232,7 +232,7 @@ fn convert_literal_rows(
vt: &substrait::proto::read_rel::VirtualTable,
named_struct: &substrait::proto::NamedStruct,
) -> datafusion::common::Result<Vec<Vec<Expr>>> {
- #[allow(deprecated)]
+ #[expect(deprecated)]
vt.values
.iter()
.map(|row| {
diff --git a/datafusion/substrait/src/logical_plan/consumer/types.rs
b/datafusion/substrait/src/logical_plan/consumer/types.rs
index ef1000a1cc..1fe3ad3301 100644
--- a/datafusion/substrait/src/logical_plan/consumer/types.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/types.rs
@@ -17,7 +17,7 @@
use super::utils::{from_substrait_precision, next_struct_field_name,
DEFAULT_TIMEZONE};
use super::SubstraitConsumer;
-#[allow(deprecated)]
+#[expect(deprecated)]
use crate::variation_const::{
DATE_32_TYPE_VARIATION_REF, DATE_64_TYPE_VARIATION_REF,
DECIMAL_128_TYPE_VARIATION_REF, DECIMAL_256_TYPE_VARIATION_REF,
@@ -90,7 +90,7 @@ pub fn from_substrait_type(
r#type::Kind::Fp64(_) => Ok(DataType::Float64),
r#type::Kind::Timestamp(ts) => {
// Kept for backwards compatibility, new plans should use
PrecisionTimestamp(Tz) instead
- #[allow(deprecated)]
+ #[expect(deprecated)]
match ts.type_variation_reference {
TIMESTAMP_SECOND_TYPE_VARIATION_REF => {
Ok(DataType::Timestamp(TimeUnit::Second, None))
@@ -248,7 +248,7 @@ pub fn from_substrait_type(
// TODO: remove the code below once the producer has been
updated
if let Some(name) =
consumer.get_extensions().types.get(&u.type_reference)
{
- #[allow(deprecated)]
+ #[expect(deprecated)]
match name.as_ref() {
// Kept for backwards compatibility, producers should
use IntervalCompound instead
INTERVAL_MONTH_DAY_NANO_TYPE_NAME =>
Ok(DataType::Interval(IntervalUnit::MonthDayNano)),
@@ -261,7 +261,7 @@ pub fn from_substrait_type(
),
}
} else {
- #[allow(deprecated)]
+ #[expect(deprecated)]
match u.type_reference {
// Kept for backwards compatibility, producers should
use IntervalYear instead
INTERVAL_YEAR_MONTH_TYPE_REF => {
diff --git
a/datafusion/substrait/src/logical_plan/producer/expr/aggregate_function.rs
b/datafusion/substrait/src/logical_plan/producer/expr/aggregate_function.rs
index 1e79897a1b..3713f8934f 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/aggregate_function.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/aggregate_function.rs
@@ -54,7 +54,7 @@ pub fn from_aggregate_function(
});
}
let function_anchor = producer.register_function(func.name().to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Measure {
measure: Some(AggregateFunction {
function_reference: function_anchor,
diff --git a/datafusion/substrait/src/logical_plan/producer/expr/mod.rs
b/datafusion/substrait/src/logical_plan/producer/expr/mod.rs
index f4e43fd586..49ee0b1c50 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/mod.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/mod.rs
@@ -62,7 +62,7 @@ use substrait::version;
/// message. The field names of the input schema will be serialized.
// Silence deprecation warnings for `extension_uris` during the uri -> urn
migration
// See: https://github.com/substrait-io/substrait/issues/856
-#[allow(deprecated)]
+#[expect(deprecated)]
pub fn to_substrait_extended_expr(
exprs: &[(&Expr, &Field)],
schema: &DFSchemaRef,
diff --git
a/datafusion/substrait/src/logical_plan/producer/expr/scalar_function.rs
b/datafusion/substrait/src/logical_plan/producer/expr/scalar_function.rs
index abb26f6f66..a12dc6ac84 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/scalar_function.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/scalar_function.rs
@@ -37,7 +37,7 @@ pub fn from_scalar_function(
let arguments = custom_argument_handler(fun.name(), arguments);
let function_anchor = producer.register_function(fun.name().to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
@@ -155,7 +155,7 @@ fn make_substrait_like_expr(
},
];
- #[allow(deprecated)]
+ #[expect(deprecated)]
let substrait_like = Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
@@ -169,7 +169,7 @@ fn make_substrait_like_expr(
if negated {
let function_anchor = producer.register_function("not".to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
@@ -217,7 +217,7 @@ pub fn make_binary_op_scalar_func(
op: Operator,
) -> Expression {
let function_anchor =
producer.register_function(operator_to_name(op).to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
diff --git
a/datafusion/substrait/src/logical_plan/producer/expr/singular_or_list.rs
b/datafusion/substrait/src/logical_plan/producer/expr/singular_or_list.rs
index 1c0b6dcc15..2d53db6501 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/singular_or_list.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/singular_or_list.rs
@@ -48,7 +48,7 @@ pub fn from_in_list(
if *negated {
let function_anchor = producer.register_function("not".to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
diff --git a/datafusion/substrait/src/logical_plan/producer/expr/subquery.rs
b/datafusion/substrait/src/logical_plan/producer/expr/subquery.rs
index c1ee78c68c..f2e6ff5512 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/subquery.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/subquery.rs
@@ -54,7 +54,7 @@ pub fn from_in_subquery(
if *negated {
let function_anchor = producer.register_function("not".to_string());
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Expression {
rex_type: Some(RexType::ScalarFunction(ScalarFunction {
function_reference: function_anchor,
diff --git
a/datafusion/substrait/src/logical_plan/producer/expr/window_function.rs
b/datafusion/substrait/src/logical_plan/producer/expr/window_function.rs
index 465479e1e0..edc5b26ca9 100644
--- a/datafusion/substrait/src/logical_plan/producer/expr/window_function.rs
+++ b/datafusion/substrait/src/logical_plan/producer/expr/window_function.rs
@@ -86,7 +86,7 @@ fn make_substrait_window_function(
bounds: (Bound, Bound),
bounds_type: BoundsType,
) -> Expression {
- #[allow(deprecated)]
+ #[expect(deprecated)]
Expression {
rex_type: Some(RexType::WindowFunction(SubstraitWindowFunction {
function_reference,
diff --git a/datafusion/substrait/src/logical_plan/producer/plan.rs
b/datafusion/substrait/src/logical_plan/producer/plan.rs
index ad8f45ec36..7c23d4b25d 100644
--- a/datafusion/substrait/src/logical_plan/producer/plan.rs
+++ b/datafusion/substrait/src/logical_plan/producer/plan.rs
@@ -26,7 +26,7 @@ use substrait::version;
/// Convert DataFusion LogicalPlan to Substrait Plan
// Silence deprecation warnings for `extension_uris` during the uri -> urn
migration
// See: https://github.com/substrait-io/substrait/issues/856
-#[allow(deprecated)]
+#[expect(deprecated)]
pub fn to_substrait_plan(
plan: &LogicalPlan,
state: &SessionState,
diff --git
a/datafusion/substrait/src/logical_plan/producer/rel/aggregate_rel.rs
b/datafusion/substrait/src/logical_plan/producer/rel/aggregate_rel.rs
index 9861401cb1..98392ab05a 100644
--- a/datafusion/substrait/src/logical_plan/producer/rel/aggregate_rel.rs
+++ b/datafusion/substrait/src/logical_plan/producer/rel/aggregate_rel.rs
@@ -64,7 +64,7 @@ pub fn from_distinct(
.map(substrait_field_ref)
.collect::<datafusion::common::Result<Vec<_>>>()?;
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Box::new(Rel {
rel_type: Some(RelType::Aggregate(Box::new(AggregateRel {
common: None,
@@ -168,7 +168,7 @@ pub fn parse_flat_grouping_exprs(
ref_group_exprs.push(rex);
expression_references.push((ref_group_exprs.len() - 1) as u32);
}
- #[allow(deprecated)]
+ #[expect(deprecated)]
Ok(Grouping {
grouping_expressions,
expression_references,
diff --git a/datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs
b/datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs
index 6ef8635b67..17efed6813 100644
--- a/datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs
+++ b/datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs
@@ -182,13 +182,13 @@ pub fn from_empty_relation(
// nested expression support (RexType::Nested) is not yet
implemented.
// The 'values' field uses literal::Struct which the consumer can
properly
// deserialize with field name preservation.
- #[allow(deprecated)]
+ #[expect(deprecated)]
values: vec![LiteralStruct { fields }],
expressions: vec![],
})
} else {
ReadType::VirtualTable(VirtualTable {
- #[allow(deprecated)]
+ #[expect(deprecated)]
values: vec![],
expressions: vec![],
})
@@ -229,7 +229,6 @@ pub fn from_values(
convert_expression_rows(producer, &v.values, schema_len,
&empty_schema)?;
(vec![], expressions)
};
- #[allow(deprecated)]
Ok(Box::new(Rel {
rel_type: Some(RelType::Read(Box::new(ReadRel {
common: None,
@@ -238,8 +237,8 @@ pub fn from_values(
best_effort_filter: None,
projection: None,
advanced_extension: None,
+ #[expect(deprecated)]
read_type: Some(ReadType::VirtualTable(VirtualTable {
- #[allow(deprecated)]
values,
expressions,
})),
diff --git a/datafusion/substrait/tests/utils.rs
b/datafusion/substrait/tests/utils.rs
index f84594312b..11a04c3b5d 100644
--- a/datafusion/substrait/tests/utils.rs
+++ b/datafusion/substrait/tests/utils.rs
@@ -155,7 +155,7 @@ pub mod test {
Ok(())
}
- #[allow(deprecated)]
+ #[expect(deprecated)]
fn collect_schemas_from_rel(&mut self, rel: &Rel) -> Result<()> {
let rel_type = rel
.rel_type
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]