[
https://issues.apache.org/jira/browse/ARROW-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433331#comment-16433331
]
ASF GitHub Bot commented on ARROW-2445:
---------------------------------------
liurenjie1024 commented on a change in pull request #1881: ARROW-2445: [Rust]
Add documentation and make some fields private
URL: https://github.com/apache/arrow/pull/1881#discussion_r180619803
##########
File path: rust/src/array.rs
##########
@@ -86,13 +90,25 @@ impl Array {
}
}
+ /// Get a reference to the array data
pub fn data(&self) -> &ArrayData {
&self.data
}
+ /// number of elements in the array
pub fn len(&self) -> usize {
self.len as usize
}
+
+ /// number of null elements in the array
+ pub fn null_count(&self) -> usize {
+ self.null_count as usize
+ }
+
+ /// If null_count is greater than zero then the validity_bitmap will be
Some(Bitmap)
+ pub fn validity_bitmap(&self) -> &Option<Bitmap> {
Review comment:
I don't think it's a good idea to expose validity bitmap directly to user. I
think we should just add methods to test whether a position is set.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Rust] Add documentation and make some fields private
> -----------------------------------------------------
>
> Key: ARROW-2445
> URL: https://issues.apache.org/jira/browse/ARROW-2445
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Rust
> Reporter: Andy Grove
> Assignee: Andy Grove
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 0.10.0
>
>
> A first pass at adding rustdoc comments and made some struct fields private
> and added accessor methods.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)