Skip to content

Commit

Permalink
fix hash again
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanrfrazier committed Aug 22, 2023
1 parent 8588a55 commit a3a9e90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/sparrow-instructions/src/inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,13 @@ impl PartialEq for InstKind {

impl Hash for InstKind {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
core::mem::discriminant(self).hash(state);
match self {
InstKind::Udf(udf) => udf.hash(state),
InstKind::Simple(op) => op.hash(state),
InstKind::Cast(dt) => dt.hash(state),
_ => core::mem::discriminant(self).hash(state),
InstKind::Record => {}
InstKind::FieldRef => {}
}
}
}
Expand Down

0 comments on commit a3a9e90

Please sign in to comment.