Rich-T-kid commented on code in PR #10902:
URL: https://github.com/apache/arrow-rs/pull/10902#discussion_r3890101145
##########
arrow-schema/src/lib.rs:
##########
@@ -183,6 +183,28 @@ impl ops::Not for SortOptions {
}
}
}
+/// Controls which properties of nested [`Field`]s are considered when
comparing
+/// two [`DataType`]s for [semantic equality](DataType::semantic_equality).
+///
+/// Plain [`PartialEq`] on [`DataType`] requires an exact match of every nested
+/// field, including its name, nullability, and metadata. `EquivalenceGauge`
lets
+/// callers relax those checks, e.g. to treat `List<item: Int32>` and
+/// `List<element: Int32>` as equivalent by setting `check_field_name` to
`false`.
+#[derive(Clone, Debug)]
Review Comment:
thinking about this a bit more, a default constructor (all false) should be
enough.
The point of the `SemanticEqualityOptions` is to relax the strictness of
comparison between datatypes, if users want a more strict comparison they
should manually opt in.
--
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]