Skip to content

Commit

Permalink
update cast (#8458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H authored Dec 8, 2023
1 parent ecb7c7d commit 3f6ff22
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datafusion/physical-expr/src/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ impl PhysicalExpr for CastExpr {
let mut s = state;
self.expr.hash(&mut s);
self.cast_type.hash(&mut s);
// Add `self.cast_options` when hash is available
// https://github.com/apache/arrow-rs/pull/4395
self.cast_options.hash(&mut s);
}

/// A [`CastExpr`] preserves the ordering of its child.
Expand All @@ -157,8 +156,7 @@ impl PartialEq<dyn Any> for CastExpr {
.map(|x| {
self.expr.eq(&x.expr)
&& self.cast_type == x.cast_type
// TODO: Use https://github.com/apache/arrow-rs/issues/2966 when available
&& self.cast_options.safe == x.cast_options.safe
&& self.cast_options == x.cast_options
})
.unwrap_or(false)
}
Expand Down

0 comments on commit 3f6ff22

Please sign in to comment.