Skip to content

Commit 26c8004

Browse files
authored
Rename aggregation modules, GroupColumn (#12619)
1 parent dbfde67 commit 26c8004

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

datafusion/physical-plan/src/aggregates/group_values/column_wise.rs renamed to datafusion/physical-plan/src/aggregates/group_values/column.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use crate::aggregates::group_values::group_value_row::{
19-
ArrayRowEq, ByteGroupValueBuilder, PrimitiveGroupValueBuilder,
18+
use crate::aggregates::group_values::group_column::{
19+
ByteGroupValueBuilder, GroupColumn, PrimitiveGroupValueBuilder,
2020
};
2121
use crate::aggregates::group_values::GroupValues;
2222
use ahash::RandomState;
@@ -57,7 +57,7 @@ pub struct GroupValuesColumn {
5757
/// The actual group by values, stored column-wise. Compare from
5858
/// the left to right, each column is stored as `ArrayRowEq`.
5959
/// This is shown faster than the row format
60-
group_values: Vec<Box<dyn ArrayRowEq>>,
60+
group_values: Vec<Box<dyn GroupColumn>>,
6161

6262
/// reused buffer to store hashes
6363
hashes_buffer: Vec<u64>,
@@ -180,7 +180,7 @@ impl GroupValues for GroupValuesColumn {
180180
}
181181

182182
fn check_row_equal(
183-
array_row: &dyn ArrayRowEq,
183+
array_row: &dyn GroupColumn,
184184
lhs_row: usize,
185185
array: &ArrayRef,
186186
rhs_row: usize,

datafusion/physical-plan/src/aggregates/group_values/group_value_row.rs renamed to datafusion/physical-plan/src/aggregates/group_values/group_column.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ use datafusion_physical_expr_common::binary_map::{OutputType, INITIAL_BUFFER_CAP
4343
/// (similar to various builders in Arrow-rs) that allow for quick comparison to
4444
/// incoming rows.
4545
///
46-
pub trait ArrayRowEq: Send + Sync {
46+
pub trait GroupColumn: Send + Sync {
4747
/// Returns equal if the row stored in this builder at `lhs_row` is equal to
4848
/// the row in `array` at `rhs_row`
4949
fn equal_to(&self, lhs_row: usize, array: &ArrayRef, rhs_row: usize) -> bool;
5050
/// Appends the row at `row` in `array` to this builder
5151
fn append_val(&mut self, array: &ArrayRef, row: usize);
5252
/// Returns the number of rows stored in this builder
5353
fn len(&self) -> usize;
54-
/// Returns the number of bytes used by this [`ArrayRowEq`]
54+
/// Returns the number of bytes used by this [`GroupColumn`]
5555
fn size(&self) -> usize;
5656
/// Builds a new array from all of the stored rows
5757
fn build(self: Box<Self>) -> ArrayRef;
@@ -82,7 +82,7 @@ where
8282
}
8383
}
8484

85-
impl<T: ArrowPrimitiveType> ArrayRowEq for PrimitiveGroupValueBuilder<T> {
85+
impl<T: ArrowPrimitiveType> GroupColumn for PrimitiveGroupValueBuilder<T> {
8686
fn equal_to(&self, lhs_row: usize, array: &ArrayRef, rhs_row: usize) -> bool {
8787
// non-null fast path
8888
// both non-null
@@ -225,7 +225,7 @@ where
225225
}
226226
}
227227

228-
impl<O> ArrayRowEq for ByteGroupValueBuilder<O>
228+
impl<O> GroupColumn for ByteGroupValueBuilder<O>
229229
where
230230
O: OffsetSizeTrait,
231231
{
@@ -407,7 +407,7 @@ mod tests {
407407
use arrow_array::{ArrayRef, StringArray};
408408
use datafusion_physical_expr::binary_map::OutputType;
409409

410-
use super::{ArrayRowEq, ByteGroupValueBuilder};
410+
use super::{ByteGroupValueBuilder, GroupColumn};
411411

412412
#[test]
413413
fn test_take_n() {

datafusion/physical-plan/src/aggregates/group_values/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ pub(crate) mod primitive;
2525
use datafusion_expr::EmitTo;
2626
use primitive::GroupValuesPrimitive;
2727

28-
mod column_wise;
28+
mod column;
2929
mod row;
30-
use column_wise::GroupValuesColumn;
30+
use column::GroupValuesColumn;
3131
use row::GroupValuesRows;
3232

3333
mod bytes;
3434
mod bytes_view;
3535
use bytes::GroupValuesByes;
3636
use datafusion_physical_expr::binary_map::OutputType;
3737

38-
mod group_value_row;
38+
mod group_column;
3939

4040
/// An interning store for group keys
4141
pub trait GroupValues: Send {

0 commit comments

Comments
 (0)