Enforce clippy::allow_attributes globally across workspace (#19576)

## 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.
-->

- Closes #18881

## Rationale for this change

<!--
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.
-->

See issue.

## What changes are included in this PR?

<!--
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.
-->

Fix up dangling `allow`s that weren't covered in previous PRs, remove
the per crate disables, and enable the warning at the workspace level.

## Are these changes tested?

<!--
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)?
-->

Linting.

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

No.

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Jeffrey Vo
2026-01-28 16:15:10 +09:00
committed by GitHub
parent 16368983bd
commit 5f9bacddcd
62 changed files with 32 additions and 116 deletions
+2
View File
@@ -201,6 +201,8 @@ uninlined_format_args = "warn"
inefficient_to_string = "warn"
# https://github.com/apache/datafusion/issues/18503
needless_pass_by_value = "warn"
# https://github.com/apache/datafusion/issues/18881
allow_attributes = "warn"
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
@@ -219,7 +219,7 @@ struct MetadataAdapterFactory {
// Rust's dead code analysis doesn't recognize Debug-based field access.
// In PR #19234, this field is used by `with_partition_values`, but that method
// doesn't exist in upstream DataFusion's PhysicalExprAdapter trait.
#[allow(dead_code)]
#[expect(dead_code)]
tag: String,
}
@@ -22,7 +22,7 @@
///
/// On non-Windows systems, this example creates a named pipe (FIFO) and
/// writes rows into it asynchronously while DataFusion reads the data
/// through a `FileStreamProvider`.
/// through a `FileStreamProvider`.
///
/// This illustrates how to integrate dynamically updated data sources
/// with DataFusion without needing to reload the entire dataset each time.
@@ -126,7 +126,6 @@ mod non_windows {
let broken_pipe_timeout = Duration::from_secs(10);
let sa = file_path;
// Spawn a new thread to write to the FIFO file
#[allow(clippy::disallowed_methods)] // spawn allowed only in tests
tasks.spawn_blocking(move || {
let file = OpenOptions::new().write(true).open(sa).unwrap();
// Reference time to use when deciding to fail the test
@@ -140,7 +140,6 @@ struct DirSchemaOpts<'a> {
/// Schema where every file with extension `ext` in a given `dir` is a table.
#[derive(Debug)]
struct DirSchema {
ext: String,
tables: RwLock<HashMap<String, Arc<dyn TableProvider>>>,
}
@@ -173,14 +172,8 @@ impl DirSchema {
}
Ok(Arc::new(Self {
tables: RwLock::new(tables),
ext: ext.to_string(),
}))
}
#[allow(unused)]
fn name(&self) -> &str {
&self.ext
}
}
#[async_trait]
@@ -217,7 +210,6 @@ impl SchemaProvider for DirSchema {
/// If supported by the implementation, removes an existing table from this schema and returns it.
/// If no table of that name exists, returns Ok(None).
#[allow(unused_variables)]
fn deregister_table(&self, name: &str) -> Result<Option<Arc<dyn TableProvider>>> {
let mut tables = self.tables.write().unwrap();
log::info!("dropping table {name}");
@@ -120,7 +120,6 @@ impl FlightSqlServiceImpl {
Ok(uuid)
}
#[allow(clippy::result_large_err)]
fn get_ctx<T>(&self, req: &Request<T>) -> Result<Arc<SessionContext>, Status> {
// get the token from the authorization header on Request
let auth = req
@@ -146,7 +145,6 @@ impl FlightSqlServiceImpl {
}
}
#[allow(clippy::result_large_err)]
fn get_plan(&self, handle: &str) -> Result<LogicalPlan, Status> {
if let Some(plan) = self.statements.get(handle) {
Ok(plan.clone())
@@ -155,7 +153,6 @@ impl FlightSqlServiceImpl {
}
}
#[allow(clippy::result_large_err)]
fn get_result(&self, handle: &str) -> Result<Vec<RecordBatch>, Status> {
if let Some(result) = self.results.get(handle) {
Ok(result.clone())
@@ -203,13 +200,11 @@ impl FlightSqlServiceImpl {
.unwrap()
}
#[allow(clippy::result_large_err)]
fn remove_plan(&self, handle: &str) -> Result<(), Status> {
self.statements.remove(&handle.to_string());
Ok(())
}
#[allow(clippy::result_large_err)]
fn remove_result(&self, handle: &str) -> Result<(), Status> {
self.results.remove(&handle.to_string());
Ok(())
-1
View File
@@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.
#![deny(clippy::allow_attributes)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
-1
View File
@@ -24,7 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
//! Interfaces and default implementations of catalogs and schemas.
//!
-1
View File
@@ -16,7 +16,6 @@
// under the License.
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
-1
View File
@@ -24,7 +24,6 @@
// 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)]
mod column;
mod dfschema;
@@ -36,6 +36,7 @@ use std::sync::Arc;
/// create an in-memory table given the partition len, array len, and batch size,
/// and the result table will be of array_len in total, and then partitioned, and batched.
#[expect(clippy::allow_attributes)] // some issue where expect(dead_code) doesn't fire properly
#[allow(dead_code)]
pub fn create_table_provider(
partitions_len: usize,
@@ -183,6 +184,7 @@ impl TraceIdBuilder {
/// Create time series data with `partition_cnt` partitions and `sample_cnt` rows per partition
/// in ascending order, if `asc` is true, otherwise randomly sampled using a Pareto distribution
#[expect(clippy::allow_attributes)] // some issue where expect(dead_code) doesn't fire properly
#[allow(dead_code)]
pub(crate) fn make_data(
partition_cnt: i32,
@@ -322,7 +322,7 @@ async fn save_plans(
}
}
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn run_benchmark(
c: &mut Criterion,
rt: &Runtime,
@@ -84,30 +84,6 @@ fn print_window_docs() -> Result<String> {
print_docs(providers, window_doc_sections::doc_sections())
}
// Temporary method useful to semi automate
// the migration of UDF documentation generation from code based
// to attribute based
// To be removed
#[allow(dead_code)]
fn save_doc_code_text(documentation: &Documentation, name: &str) {
let attr_text = documentation.to_doc_attribute();
let file_path = format!("{name}.txt");
if std::path::Path::new(&file_path).exists() {
std::fs::remove_file(&file_path).unwrap();
}
// Open the file in append mode, create it if it doesn't exist
let mut file = std::fs::OpenOptions::new()
.append(true) // Open in append mode
.create(true) // Create the file if it doesn't exist
.open(file_path)
.unwrap();
use std::io::Write;
file.write_all(attr_text.as_bytes()).unwrap();
}
#[expect(clippy::needless_pass_by_value)]
fn print_docs(
providers: Vec<Box<dyn DocProvider>>,
@@ -306,8 +282,7 @@ impl DocProvider for WindowUDF {
}
}
#[allow(clippy::borrowed_box)]
#[allow(clippy::ptr_arg)]
#[expect(clippy::borrowed_box)]
fn get_names_and_aliases(functions: &Vec<&Box<dyn DocProvider>>) -> Vec<String> {
functions
.iter()
-1
View File
@@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.
#![deny(clippy::allow_attributes)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
@@ -95,7 +95,7 @@ impl TableProvider for CaptureDeleteProvider {
}
/// A TableProvider that captures filters and assignments passed to update().
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
struct CaptureUpdateProvider {
schema: SchemaRef,
received_filters: Arc<Mutex<Option<Vec<Expr>>>>,
+1 -1
View File
@@ -767,7 +767,7 @@ async fn hash_join_without_repartition_and_no_agg(
#[derive(Debug)]
enum Yielded {
ReadyOrPending,
Err(#[allow(dead_code)] DataFusionError),
Err(#[expect(dead_code)] DataFusionError),
Timeout,
}
+2 -2
View File
@@ -94,7 +94,6 @@ mod unix_test {
/// This function creates a writing task for the FIFO file. To verify
/// incremental processing, it waits for a signal to continue writing after
/// a certain number of lines are written.
#[allow(clippy::disallowed_methods)]
fn create_writing_task(
file_path: PathBuf,
header: String,
@@ -105,6 +104,7 @@ mod unix_test {
// Timeout for a long period of BrokenPipe error
let broken_pipe_timeout = Duration::from_secs(10);
// Spawn a new task to write to the FIFO file
#[expect(clippy::disallowed_methods)]
tokio::spawn(async move {
let mut file = tokio::fs::OpenOptions::new()
.write(true)
@@ -357,7 +357,7 @@ mod unix_test {
(sink_fifo_path.clone(), sink_fifo_path.display());
// Spawn a new thread to read sink EXTERNAL TABLE.
#[allow(clippy::disallowed_methods)] // spawn allowed only in tests
#[expect(clippy::disallowed_methods)] // spawn allowed only in tests
tasks.push(spawn_blocking(move || {
let file = File::open(sink_fifo_path_thread).unwrap();
let schema = Arc::new(Schema::new(vec![
@@ -214,7 +214,7 @@ impl GeneratedSessionContextBuilder {
/// The generated params for [`SessionContext`]
#[derive(Debug)]
#[allow(dead_code)]
#[expect(dead_code)]
pub struct SessionContextParams {
batch_size: usize,
target_partitions: usize,
@@ -182,13 +182,13 @@ impl QueryBuilder {
/// Add max columns num in group by(default: 3), for example if it is set to 1,
/// the generated sql will group by at most 1 column
#[allow(dead_code)]
#[expect(dead_code)]
pub fn with_max_group_by_columns(mut self, max_group_by_columns: usize) -> Self {
self.max_group_by_columns = max_group_by_columns;
self
}
#[allow(dead_code)]
#[expect(dead_code)]
pub fn with_min_group_by_columns(mut self, min_group_by_columns: usize) -> Self {
self.min_group_by_columns = min_group_by_columns;
self
@@ -202,7 +202,7 @@ impl QueryBuilder {
}
/// Add if also test the no grouping aggregation case(default: true)
#[allow(dead_code)]
#[expect(dead_code)]
pub fn with_no_grouping(mut self, no_grouping: bool) -> Self {
self.no_grouping = no_grouping;
self
@@ -1087,7 +1087,7 @@ impl JoinFuzzTestCase {
/// Files can be of different sizes
/// The method can be useful to read partitions have been saved by `save_partitioned_batches_as_parquet`
/// for test debugging purposes
#[allow(dead_code)]
#[expect(dead_code)]
async fn load_partitioned_batches_from_parquet(
dir: &str,
) -> std::io::Result<Vec<RecordBatch>> {
@@ -301,7 +301,7 @@ mod sp_repartition_fuzz_tests {
let mut handles = Vec::new();
for seed in seed_start..seed_end {
#[allow(clippy::disallowed_methods)] // spawn allowed only in tests
#[expect(clippy::disallowed_methods)] // spawn allowed only in tests
let job = tokio::spawn(run_sort_preserving_repartition_test(
make_staggered_batches::<true>(n_row, n_distinct, seed as u64),
is_first_roundrobin,
+2 -2
View File
@@ -73,7 +73,7 @@ mod config_field {
#[test]
fn test_macro() {
#[derive(Debug)]
#[allow(dead_code)]
#[expect(dead_code)]
struct E;
impl std::fmt::Display for E {
@@ -84,7 +84,7 @@ mod config_field {
impl std::error::Error for E {}
#[allow(dead_code)]
#[expect(dead_code)]
#[derive(Default)]
struct S;
@@ -220,7 +220,6 @@ async fn single_file() {
}
#[tokio::test]
#[allow(dead_code)]
async fn single_file_small_data_pages() {
let batches = read_parquet_test_data(
"tests/data/filter_pushdown/single_file_small_pages.gz.parquet",
-1
View File
@@ -19,7 +19,6 @@
// 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)]
//! [`ArrowFormat`]: Apache Arrow file format abstractions
-1
View File
@@ -24,7 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
//! An [Avro](https://avro.apache.org/) based [`FileSource`](datafusion_datasource::file::FileSource) implementation and related functionality.
-1
View File
@@ -19,7 +19,6 @@
// 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)]
pub mod file_format;
pub mod source;
-1
View File
@@ -19,7 +19,6 @@
// 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)]
pub mod file_format;
pub mod source;
-1
View File
@@ -19,7 +19,6 @@
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
pub mod access_plan;
pub mod file_format;
-1
View File
@@ -24,7 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
//! A table that uses the `ObjectStore` listing capability
//! to get the list of files to process.
-1
View File
@@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.
#![deny(clippy::allow_attributes)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
-1
View File
@@ -24,7 +24,6 @@
// 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)]
//! DataFusion execution configuration and runtime structures
-1
View File
@@ -32,7 +32,6 @@
// 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 accumulator;
pub mod casts;
-1
View File
@@ -24,7 +24,6 @@
// 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)]
//! [DataFusion](https://github.com/apache/datafusion)
//! is an extensible query execution framework that uses
-1
View File
@@ -24,7 +24,6 @@
// 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;
@@ -31,8 +31,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
pub mod accumulator;
pub mod aggregate;
@@ -43,7 +43,7 @@ fn merge_batch_bench(c: &mut Criterion, name: &str, values: ArrayRef) {
let list_item_data_type = values.as_list::<i32>().values().data_type().clone();
c.bench_function(name, |b| {
b.iter(|| {
#[allow(clippy::unit_arg)]
#[expect(clippy::unit_arg)]
black_box(
ArrayAggAccumulator::try_new(&list_item_data_type, false)
.unwrap()
@@ -130,7 +130,7 @@ fn count_benchmark(c: &mut Criterion) {
let mut accumulator = prepare_accumulator();
c.bench_function("count low cardinality dict 20% nulls, no filter", |b| {
b.iter(|| {
#[allow(clippy::unit_arg)]
#[expect(clippy::unit_arg)]
black_box(
accumulator
.update_batch(std::slice::from_ref(&values))
@@ -24,8 +24,6 @@
// Make sure fast / cheap clones on Arc are explicit:
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Aggregate Function packages for [DataFusion].
//!
-2
View File
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Nested type Functions for [DataFusion].
//!
-2
View File
@@ -24,8 +24,6 @@
// 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))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
pub mod generate_series;
@@ -24,8 +24,6 @@
// 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))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Common user-defined window functionality for [DataFusion]
//!
-1
View File
@@ -25,7 +25,6 @@
// https://github.com/apache/datafusion/issues/11143
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Window Function packages for [DataFusion].
//!
+2 -2
View File
@@ -143,7 +143,7 @@ fn create_args(
]
}
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn run_with_string_type<M: Measurement>(
group: &mut BenchmarkGroup<'_, M>,
trim_func: &ScalarUDF,
@@ -189,7 +189,7 @@ fn run_with_string_type<M: Measurement>(
);
}
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn run_trim_benchmark(
c: &mut Criterion,
group_name: &str,
-2
View File
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Function packages for [DataFusion].
//!
-1
View File
@@ -20,7 +20,6 @@
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;
-1
View File
@@ -23,7 +23,6 @@
// 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
@@ -21,8 +21,6 @@
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Physical expression schema adaptation utilities for DataFusion
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Physical Expr Common packages for [DataFusion]
//! This package contains high level PhysicalExpr trait
-2
View File
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
// Backward compatibility
pub mod aggregate;
-2
View File
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
pub mod aggregate_statistics;
pub mod combine_partial_final_agg;
-2
View File
@@ -24,8 +24,6 @@
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
// https://github.com/apache/datafusion/issues/18881
#![deny(clippy::allow_attributes)]
//! Traits for physical query plan, supporting parallel execution for partitioned relations.
//!
@@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.
// This code is generated so we don't want to fix any lint violations manually
#[allow(clippy::allow_attributes)]
#[allow(clippy::all)]
#[rustfmt::skip]
-1
View File
@@ -24,7 +24,6 @@
// 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)]
//! Serialize / Deserialize DataFusion Primitive Types to bytes
//!
+2 -2
View File
@@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.
#![allow(clippy::allow_attributes)]
// This code is generated so we don't want to fix any lint violations manually
#[allow(clippy::allow_attributes)]
#[allow(clippy::all)]
#[rustfmt::skip]
pub mod datafusion {
-1
View File
@@ -23,7 +23,6 @@
// 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))]
//! Serialize / Deserialize DataFusion Plans to bytes
-1
View File
@@ -16,7 +16,6 @@
// under the License.
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
mod file_pruner;
mod pruning_predicate;
-1
View File
@@ -16,7 +16,6 @@
// under the License.
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
#![deny(clippy::allow_attributes)]
//! Session management for DataFusion query execution environment
//!
-1
View File
@@ -22,7 +22,6 @@
#![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].
-1
View File
@@ -23,7 +23,6 @@
// 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:
+1 -1
View File
@@ -44,7 +44,7 @@ pub fn setup_scratch_dir(name: &Path) -> Result<()> {
/// Trailing whitespace from lines in SLT will typically be removed, but do not fail if it is not
/// If particular test wants to cover trailing whitespace on a value,
/// it should project additional non-whitespace column on the right.
#[allow(clippy::ptr_arg)]
#[expect(clippy::ptr_arg)]
pub fn value_normalizer(s: &String) -> String {
s.trim_end().to_string()
}
-1
View File
@@ -23,7 +23,6 @@
// 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]
+3 -4
View File
@@ -79,7 +79,6 @@ pub fn basic_parse() {
mod test {
use std::sync::Arc;
use super::*;
use bytes::Bytes;
use datafusion::datasource::file_format::file_compression_type::FileCompressionType;
use datafusion::{
@@ -106,11 +105,11 @@ mod test {
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
#[cfg(target_arch = "wasm32")]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
#[cfg_attr(not(target_arch = "wasm32"), allow(dead_code))]
fn datafusion_test() {
basic_exprs();
basic_parse();
super::basic_exprs();
super::basic_parse();
}
fn get_ctx() -> Arc<SessionContext> {
+1 -1
View File
@@ -129,7 +129,7 @@ impl BatchBuilder {
}
}
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn append_row(
&mut self,
rng: &mut StdRng,