diff --git a/datafusion/expr/src/expr.rs b/datafusion/expr/src/expr.rs index 71d3057575759..47c2ce4ee0795 100644 --- a/datafusion/expr/src/expr.rs +++ b/datafusion/expr/src/expr.rs @@ -662,7 +662,7 @@ pub fn intersect_metadata_for_union<'a>( } Some(current) => { // Only keep keys that exist in both with the same value - current.retain(|k, v| metadata.get(k) == Some(v)); + current.retain(|k, v| metadata.get(k) == Some(&*v)); } } }