jayzhan211 commented on code in PR #10221: URL: https://github.com/apache/datafusion/pull/10221#discussion_r1580496844
########## datafusion/expr/src/type_coercion/binary.rs: ########## @@ -638,22 +638,26 @@ fn dictionary_coercion( preserve_dictionaries: bool, ) -> Option<DataType> { use arrow::datatypes::DataType::*; + let maybe_preserve_dictionaries = + |index_type: &Box<DataType>, value_type: DataType| -> DataType { + if preserve_dictionaries { + Dictionary(index_type.clone(), Box::new(value_type)) + } else { + value_type + } + }; match (lhs_type, rhs_type) { ( Dictionary(_lhs_index_type, lhs_value_type), Dictionary(_rhs_index_type, rhs_value_type), ) => comparison_coercion(lhs_value_type, rhs_value_type), Review Comment: Probably because value type is enough for comparison -- 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