wiedld commented on code in PR #17248:
URL: https://github.com/apache/datafusion/pull/17248#discussion_r2286487449


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -2896,16 +2899,7 @@ impl Union {
 fn intersect_maps<'a>(
     inputs: impl IntoIterator<Item = &'a HashMap<String, String>>,
 ) -> HashMap<String, String> {
-    let mut inputs = inputs.into_iter();
-    let mut merged: HashMap<String, String> = 
inputs.next().cloned().unwrap_or_default();
-    for input in inputs {
-        // The extra dereference below (`&*v`) is a workaround for 
https://github.com/rkyv/rkyv/issues/434.
-        // When this crate is used in a workspace that enables the `rkyv-64` 
feature in the `chrono` crate,
-        // this triggers a Rust compilation error:
-        // error[E0277]: can't compare `Option<&std::string::String>` with 
`Option<&mut std::string::String>`.
-        merged.retain(|k, v| input.get(k) == Some(&*v));
-    }
-    merged
+    intersect_for_union(inputs)

Review Comment:
   Note that at construction, we handle the schema by intersection.



-- 
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]

Reply via email to