File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,13 @@ mod macros;
3838mod private;
3939mod scalar_macros;
4040
41- /// Returns true if the vector's data type matches the provided data type, and nulls respect
42- /// the nullability of the data type.
41+ /// Returns true if the vector's is compatible with the provided data type.
42+ ///
43+ /// This means that the vector's physical representation is compatible with the data type,
44+ /// typically meaning the enum variants match. In the case of nested types, this function
45+ /// recursively checks the child types.
46+ ///
47+ /// This function also checks that if the data type is non-nullable, the vector contains no nulls,
4348pub fn vector_matches_dtype ( vector : & Vector , dtype : & DType ) -> bool {
4449 if !dtype. is_nullable ( ) && vector. validity ( ) . false_count ( ) > 0 {
4550 // Non-nullable dtype cannot have nulls in the vector.
You can’t perform that action at this time.
0 commit comments