tustvold commented on code in PR #4042:
URL: https://github.com/apache/arrow-rs/pull/4042#discussion_r1163063937
##########
arrow-schema/src/field.rs:
##########
@@ -524,7 +524,14 @@ impl Field {
// make sure self.metadata is a superset of other.metadata
&& other.metadata.iter().all(|(k, v1)| {
self.metadata.get(k).map(|v2| v1 == v2).unwrap_or_default()
- })
+ }) {
+ true
+ } else if self.data_type().is_nested() {
+ // if self is a nested type, check if self contains other
+ self.data_type().contains(other)
+ } else {
+ false
+ }
Review Comment:
I think this will now return true if a nested field contains, but even if
properties like `self.name` are not equal?
Perhaps we could just change `self.data_type == other.data_type` to be
`self.data_type.contains(&other.data_type)`
--
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]