From 2d2685914d70e3be542d957c927a65459d901906 Mon Sep 17 00:00:00 2001 From: Jonah Gao Date: Thu, 13 Jun 2024 23:55:51 +0800 Subject: [PATCH] ci: fix clippy failures on main (#10903) * ci: fix clippy * retry ci --- datafusion/expr/src/utils.rs | 2 +- datafusion/physical-expr/src/window/nth_value.rs | 1 - datafusion/physical-expr/src/window/window_expr.rs | 1 - datafusion/physical-plan/src/joins/hash_join.rs | 2 +- datafusion/physical-plan/src/joins/stream_join_utils.rs | 1 - datafusion/physical-plan/src/joins/symmetric_hash_join.rs | 2 +- datafusion/physical-plan/src/joins/test_utils.rs | 1 - datafusion/physical-plan/src/joins/utils.rs | 1 - 8 files changed, 3 insertions(+), 8 deletions(-) diff --git a/datafusion/expr/src/utils.rs b/datafusion/expr/src/utils.rs index 71a3a5fe7309..3ab0c180dcba 100644 --- a/datafusion/expr/src/utils.rs +++ b/datafusion/expr/src/utils.rs @@ -818,7 +818,7 @@ pub(crate) fn find_column_indexes_referenced_by_expr( } } Expr::Literal(_) => { - indexes.push(std::usize::MAX); + indexes.push(usize::MAX); } _ => {} } diff --git a/datafusion/physical-expr/src/window/nth_value.rs b/datafusion/physical-expr/src/window/nth_value.rs index 55d112e1f6e0..4bd40066ff34 100644 --- a/datafusion/physical-expr/src/window/nth_value.rs +++ b/datafusion/physical-expr/src/window/nth_value.rs @@ -125,7 +125,6 @@ impl BuiltInWindowFunctionExpr for NthValue { fn create_evaluator(&self) -> Result> { let state = NthValueState { - range: Default::default(), finalized_result: None, kind: self.kind, }; diff --git a/datafusion/physical-expr/src/window/window_expr.rs b/datafusion/physical-expr/src/window/window_expr.rs index 065371d9e43e..3cf68379d72b 100644 --- a/datafusion/physical-expr/src/window/window_expr.rs +++ b/datafusion/physical-expr/src/window/window_expr.rs @@ -559,7 +559,6 @@ pub enum NthValueKind { #[derive(Debug, Clone)] pub struct NthValueState { - pub range: Range, // In certain cases, we can finalize the result early. Consider this usage: // ``` // FIRST_VALUE(increasing_col) OVER window AS my_first_value diff --git a/datafusion/physical-plan/src/joins/hash_join.rs b/datafusion/physical-plan/src/joins/hash_join.rs index 784584f03f0f..cd66ab093f88 100644 --- a/datafusion/physical-plan/src/joins/hash_join.rs +++ b/datafusion/physical-plan/src/joins/hash_join.rs @@ -21,7 +21,7 @@ use std::fmt; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use std::task::Poll; -use std::{any::Any, usize, vec}; +use std::{any::Any, vec}; use super::{ utils::{OnceAsync, OnceFut}, diff --git a/datafusion/physical-plan/src/joins/stream_join_utils.rs b/datafusion/physical-plan/src/joins/stream_join_utils.rs index 0a01d84141e7..46d3ac5acf1e 100644 --- a/datafusion/physical-plan/src/joins/stream_join_utils.rs +++ b/datafusion/physical-plan/src/joins/stream_join_utils.rs @@ -20,7 +20,6 @@ use std::collections::{HashMap, VecDeque}; use std::sync::Arc; -use std::usize; use crate::joins::utils::{JoinFilter, JoinHashMapType}; use crate::metrics::{ExecutionPlanMetricsSet, MetricBuilder}; diff --git a/datafusion/physical-plan/src/joins/symmetric_hash_join.rs b/datafusion/physical-plan/src/joins/symmetric_hash_join.rs index 7b4d790479b1..e11e6dd2f627 100644 --- a/datafusion/physical-plan/src/joins/symmetric_hash_join.rs +++ b/datafusion/physical-plan/src/joins/symmetric_hash_join.rs @@ -29,7 +29,7 @@ use std::any::Any; use std::fmt::{self, Debug}; use std::sync::Arc; use std::task::{Context, Poll}; -use std::{usize, vec}; +use std::vec; use crate::common::SharedMemoryReservation; use crate::handle_state; diff --git a/datafusion/physical-plan/src/joins/test_utils.rs b/datafusion/physical-plan/src/joins/test_utils.rs index 9598ed83aa58..7e05ded6f69d 100644 --- a/datafusion/physical-plan/src/joins/test_utils.rs +++ b/datafusion/physical-plan/src/joins/test_utils.rs @@ -18,7 +18,6 @@ //! This file has test utils for hash joins use std::sync::Arc; -use std::usize; use crate::joins::utils::{JoinFilter, JoinOn}; use crate::joins::{ diff --git a/datafusion/physical-plan/src/joins/utils.rs b/datafusion/physical-plan/src/joins/utils.rs index 0d99d7a16356..c08b0e3d091c 100644 --- a/datafusion/physical-plan/src/joins/utils.rs +++ b/datafusion/physical-plan/src/joins/utils.rs @@ -23,7 +23,6 @@ use std::future::Future; use std::ops::{IndexMut, Range}; use std::sync::Arc; use std::task::{Context, Poll}; -use std::usize; use crate::metrics::{self, ExecutionPlanMetricsSet, MetricBuilder}; use crate::{ColumnStatistics, ExecutionPlan, Partitioning, Statistics};