Apache DataFusion SQL Query Engine
Workaround for compilation error due to rkyv#434. (#14863)
Leonid Ryzhyk3a1d9477b0f1
diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rsindex 870b0751c9..c6fd955952 100644--- a/datafusion/expr/src/logical_plan/plan.rs+++ b/datafusion/expr/src/logical_plan/plan.rs@@ -2869,7 +2869,11 @@ fn intersect_maps<'a>(let mut inputs = inputs.into_iter();let mut merged: HashMap<String, String> = inputs.next().cloned().unwrap_or_default();for input in inputs {- merged.retain(|k, v| input.get(k) == Some(v));+ // 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}