Skip to content

Commit

Permalink
Fix new clippy lint (#6535)
Browse files Browse the repository at this point in the history
* Fix new clippy lint

* fix new clippy
  • Loading branch information
alamb authored Jun 2, 2023
1 parent 21a14a1 commit e6af36a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ impl BoundedAggregateStream {

// NOTE: do NOT include the `RowGroupState` struct size in here because this is captured by
// `group_states` (see allocation down below)
*allocated += (std::mem::size_of::<u8>()
* group_state.group_by_values.as_ref().len())
*allocated += std::mem::size_of_val(&group_state.group_by_values)
+ (std::mem::size_of::<u8>()
* group_state.aggregation_buffer.capacity())
+ (std::mem::size_of::<u32>() * group_state.indices.capacity());
Expand Down Expand Up @@ -514,8 +513,7 @@ impl BoundedAggregateStream {

// NOTE: do NOT include the `GroupState` struct size in here because this is captured by
// `group_states` (see allocation down below)
*allocated += (std::mem::size_of::<u8>()
* group_state.group_by_values.as_ref().len())
*allocated += std::mem::size_of_val(&group_state.group_by_values)
+ (std::mem::size_of::<u8>()
* group_state.aggregation_buffer.capacity())
+ (std::mem::size_of::<u32>() * group_state.indices.capacity());
Expand Down
3 changes: 1 addition & 2 deletions datafusion/core/src/physical_plan/aggregates/row_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ impl GroupedHashAggregateStream {

// NOTE: do NOT include the `GroupState` struct size in here because this is captured by
// `group_states` (see allocation down below)
*allocated += (std::mem::size_of::<u8>()
* group_state.group_by_values.as_ref().len())
*allocated += std::mem::size_of_val(&group_state.group_by_values)
+ (std::mem::size_of::<u8>()
* group_state.aggregation_buffer.capacity())
+ (std::mem::size_of::<u32>() * group_state.indices.capacity());
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr/src/conditional_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.

//! Conditional expressions
use crate::expr::Case;
///! Conditional expressions
use crate::{expr_schema::ExprSchemable, Expr};
use arrow::datatypes::DataType;
use datafusion_common::{DFSchema, DataFusionError, Result};
Expand Down
3 changes: 2 additions & 1 deletion datafusion/expr/src/logical_plan/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
// specific language governing permissions and limitations
// under the License.

//! Logical plan types

use crate::expr::InSubquery;
use crate::expr::{Exists, Placeholder};
///! Logical plan types
use crate::logical_plan::display::{GraphvizVisitor, IndentVisitor};
use crate::logical_plan::extension::UserDefinedLogicalNode;
use crate::logical_plan::{DmlStatement, Statement};
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/table_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
// specific language governing permissions and limitations
// under the License.

//! Table source

use crate::{Expr, LogicalPlan};
use arrow::datatypes::SchemaRef;
use datafusion_common::Result;
use std::any::Any;

///! Table source

/// Indicates whether and how a filter expression can be handled by a
/// TableProvider for table scans.
#[derive(Debug, Clone, PartialEq, Eq)]
Expand Down

0 comments on commit e6af36a

Please sign in to comment.