diff --git a/datafusion/physical-plan/src/aggregates/group_values/column_wise.rs b/datafusion/physical-plan/src/aggregates/group_values/column.rs similarity index 98% rename from datafusion/physical-plan/src/aggregates/group_values/column_wise.rs rename to datafusion/physical-plan/src/aggregates/group_values/column.rs index b35d58701b5c..311f48ba9839 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/column_wise.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/column.rs @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -use crate::aggregates::group_values::group_value_row::{ - ArrayRowEq, ByteGroupValueBuilder, PrimitiveGroupValueBuilder, +use crate::aggregates::group_values::group_column::{ + ByteGroupValueBuilder, GroupColumn, PrimitiveGroupValueBuilder, }; use crate::aggregates::group_values::GroupValues; use ahash::RandomState; @@ -57,7 +57,7 @@ pub struct GroupValuesColumn { /// The actual group by values, stored column-wise. Compare from /// the left to right, each column is stored as `ArrayRowEq`. /// This is shown faster than the row format - group_values: Vec>, + group_values: Vec>, /// reused buffer to store hashes hashes_buffer: Vec, @@ -180,7 +180,7 @@ impl GroupValues for GroupValuesColumn { } fn check_row_equal( - array_row: &dyn ArrayRowEq, + array_row: &dyn GroupColumn, lhs_row: usize, array: &ArrayRef, rhs_row: usize, diff --git a/datafusion/physical-plan/src/aggregates/group_values/group_value_row.rs b/datafusion/physical-plan/src/aggregates/group_values/group_column.rs similarity index 98% rename from datafusion/physical-plan/src/aggregates/group_values/group_value_row.rs rename to datafusion/physical-plan/src/aggregates/group_values/group_column.rs index ad8da37e7ca0..a82e6d856c70 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/group_value_row.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/group_column.rs @@ -43,7 +43,7 @@ use datafusion_physical_expr_common::binary_map::{OutputType, INITIAL_BUFFER_CAP /// (similar to various builders in Arrow-rs) that allow for quick comparison to /// incoming rows. /// -pub trait ArrayRowEq: Send + Sync { +pub trait GroupColumn: Send + Sync { /// Returns equal if the row stored in this builder at `lhs_row` is equal to /// the row in `array` at `rhs_row` fn equal_to(&self, lhs_row: usize, array: &ArrayRef, rhs_row: usize) -> bool; @@ -51,7 +51,7 @@ pub trait ArrayRowEq: Send + Sync { fn append_val(&mut self, array: &ArrayRef, row: usize); /// Returns the number of rows stored in this builder fn len(&self) -> usize; - /// Returns the number of bytes used by this [`ArrayRowEq`] + /// Returns the number of bytes used by this [`GroupColumn`] fn size(&self) -> usize; /// Builds a new array from all of the stored rows fn build(self: Box) -> ArrayRef; @@ -82,7 +82,7 @@ where } } -impl ArrayRowEq for PrimitiveGroupValueBuilder { +impl GroupColumn for PrimitiveGroupValueBuilder { fn equal_to(&self, lhs_row: usize, array: &ArrayRef, rhs_row: usize) -> bool { // non-null fast path // both non-null @@ -225,7 +225,7 @@ where } } -impl ArrayRowEq for ByteGroupValueBuilder +impl GroupColumn for ByteGroupValueBuilder where O: OffsetSizeTrait, { @@ -407,7 +407,7 @@ mod tests { use arrow_array::{ArrayRef, StringArray}; use datafusion_physical_expr::binary_map::OutputType; - use super::{ArrayRowEq, ByteGroupValueBuilder}; + use super::{ByteGroupValueBuilder, GroupColumn}; #[test] fn test_take_n() { diff --git a/datafusion/physical-plan/src/aggregates/group_values/mod.rs b/datafusion/physical-plan/src/aggregates/group_values/mod.rs index 275cc7fcbf4e..3e0474d4c2d0 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/mod.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/mod.rs @@ -25,9 +25,9 @@ pub(crate) mod primitive; use datafusion_expr::EmitTo; use primitive::GroupValuesPrimitive; -mod column_wise; +mod column; mod row; -use column_wise::GroupValuesColumn; +use column::GroupValuesColumn; use row::GroupValuesRows; mod bytes; @@ -35,7 +35,7 @@ mod bytes_view; use bytes::GroupValuesByes; use datafusion_physical_expr::binary_map::OutputType; -mod group_value_row; +mod group_column; /// An interning store for group keys pub trait GroupValues: Send {