alamb commented on code in PR #14081:
URL: https://github.com/apache/datafusion/pull/14081#discussion_r1912434472
##########
datafusion/physical-expr/src/physical_expr.rs:
##########
@@ -48,31 +47,24 @@ pub fn physical_exprs_bag_equal(
lhs: &[Arc<dyn PhysicalExpr>],
rhs: &[Arc<dyn PhysicalExpr>],
) -> bool {
- // TODO: Once we can use `HashMap`s with `Arc<dyn PhysicalExpr>`, this
- // function should use a `HashMap` to reduce computational
complexity.
- if lhs.len() == rhs.len() {
- let mut rhs_vec = rhs.to_vec();
- for expr in lhs {
- if let Some(idx) = rhs_vec.iter().position(|e| expr.eq(e)) {
- rhs_vec.swap_remove(idx);
- } else {
- return false;
- }
- }
- true
- } else {
- false
+ let mut multi_set_lhs: HashMap<_, usize> = HashMap::new();
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]