klion26 commented on code in PR #7957:
URL: https://github.com/apache/arrow-rs/pull/7957#discussion_r2215927714
##########
parquet-variant/src/variant/metadata.rs:
##########
@@ -355,10 +355,8 @@ impl<'m> VariantMetadata<'m> {
// checks whether the dictionary entries are equal -- regardless of their
sorting order
impl<'m> PartialEq for VariantMetadata<'m> {
fn eq(&self, other: &Self) -> bool {
- let is_equal = self.is_empty() == other.is_empty()
- && self.is_fully_validated() == other.is_fully_validated()
- && self.first_value_byte == other.first_value_byte
- && self.validated == other.validated;
+ let is_equal =
+ self.is_empty() == other.is_empty() && self.first_value_byte ==
other.first_value_byte;
let other_field_names: HashSet<&'m str> =
HashSet::from_iter(other.iter());
Review Comment:
Is there any chance that `other_field_names` contains items not in
`self.iter()`
##########
parquet-variant/src/variant/metadata.rs:
##########
@@ -531,4 +529,15 @@ mod tests {
"unexpected error: {err:?}"
);
}
+
+ #[test]
+ fn metadata_is_equal() {
Review Comment:
do we need to add some negative tests
--
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]