Skip to content

Commit e5ef55e

Browse files
rluvatoncoderfender
authored andcommitted
feat: Add Hash trait to Aggregate enums (apache#21569)
## Which issue does this PR close? N/A ## Rationale for this change to be able to derive `Hash` ## What changes are included in this PR? derive `Hash` ## Are these changes tested? no ## Are there any user-facing changes? yes, new trait impl
1 parent f181d1a commit e5ef55e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • datafusion/physical-plan/src/aggregates

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const AGGREGATION_HASH_SEED: datafusion_common::hash_utils::RandomState =
9595
///
9696
/// See the [table on `AggregateMode`](AggregateMode#variants-and-their-inputoutput-modes)
9797
/// for how this relates to aggregate modes.
98-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
98+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
9999
pub enum AggregateInputMode {
100100
/// The stage consumes raw, unaggregated input data and calls
101101
/// [`Accumulator::update_batch`].
@@ -110,7 +110,7 @@ pub enum AggregateInputMode {
110110
///
111111
/// See the [table on `AggregateMode`](AggregateMode#variants-and-their-inputoutput-modes)
112112
/// for how this relates to aggregate modes.
113-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
113+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
114114
pub enum AggregateOutputMode {
115115
/// The stage produces intermediate accumulator state, serialized via
116116
/// [`Accumulator::state`].
@@ -138,7 +138,7 @@ pub enum AggregateOutputMode {
138138
///
139139
/// Use [`AggregateMode::input_mode`] and [`AggregateMode::output_mode`]
140140
/// to query these properties.
141-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
141+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
142142
pub enum AggregateMode {
143143
/// One of multiple layers of aggregation, any input partitioning
144144
///

0 commit comments

Comments
 (0)