jayzhan211 commented on code in PR #12839:
URL: https://github.com/apache/datafusion/pull/12839#discussion_r1796350180
##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -476,6 +478,26 @@ fn type_union_resolution_coercion(
type_union_resolution_coercion(lhs.data_type(),
rhs.data_type());
new_item_type.map(|t| DataType::List(Arc::new(Field::new("item",
t, true))))
}
+ (DataType::Struct(lhs), DataType::Struct(rhs)) => {
+ if lhs.len() != rhs.len() {
+ return None;
+ }
+
+ let types = std::iter::zip(lhs.iter(), rhs.iter())
Review Comment:
We need to fix Values first for this case, currently we doesn't have schema
(column type) for Values, so we can't tell which order is correct if we got 2
different order struct. I think we should provider schema for building values
or assume the first struct is the correct one.
--
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]