We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db239e5 commit d7c57d0Copy full SHA for d7c57d0
parquet/src/schema/types.rs
@@ -188,7 +188,7 @@ impl Type {
188
}
189
190
/// Returns `true` if this type is repeated or optional.
191
- /// If this type doesn't have repetition defined, we still treat it as optional.
+ /// If this type doesn't have repetition defined, we treat it as required.
192
pub fn is_optional(&self) -> bool {
193
self.get_basic_info().has_repetition()
194
&& self.get_basic_info().repetition() != Repetition::REQUIRED
@@ -1932,6 +1932,7 @@ mod tests {
1932
let f1 = Type::group_type_builder("f").build().unwrap();
1933
let f2 = Type::group_type_builder("f").build().unwrap();
1934
assert!(f1.check_contains(&f2));
1935
+ assert!(!f1.is_optional());
1936
1937
// OK: fields match
1938
let f1 = test_new_group_type(
0 commit comments