xudong963 commented on code in PR #14863: URL: https://github.com/apache/datafusion/pull/14863#discussion_r1969878329
########## 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>`. Review Comment: I tried to reproduce the error, but didn't: ```rust fn main() { let mut s = String::from("hello"); let ss = String::from("hello"); let option_ref: Option<&String> = Some(&ss); let mut_ref = &mut s; if option_ref == Some(mut_ref) //Option<&mut String> { { println!("They are equal!"); } } ``` Maybe I didn't notice anything? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org