You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/24 13:08:26 UTC

[GitHub] [arrow-rs] HaoYang670 opened a new issue, #1737: `ArrayDataBuilder::null_bit_buffer` should accept `Option` as input type

HaoYang670 opened a new issue, #1737:
URL: https://github.com/apache/arrow-rs/issues/1737

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   Currently, the method is implemented as this:
   ```rust
       pub fn null_bit_buffer(mut self, buf: Buffer) -> Self {
           self.null_bit_buffer = Some(buf);
           self
       }
   ```
   
   Why not set the type of `buf` to be `Option<Buffer>`?
   Two reasons of this change:
   1. more straightforward
   2. There are lots of cases where we have to use `if-else` branch to add null bitmap:
   ```rust
   let mut builder = ArrayDataBuilder::new(...);
   if let Some(null_buffer) == null_bit_map {
       builder.null_bit_buffer(null_buffer)
   }
   ...
   ```
   We can avoid these !
   


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold closed issue #1737: `ArrayDataBuilder::null_bit_buffer` should accept `Option` as input type

Posted by GitBox <gi...@apache.org>.
tustvold closed issue #1737: `ArrayDataBuilder::null_bit_buffer` should accept `Option<Buffer>` as input type
URL: https://github.com/apache/arrow-rs/issues/1737


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org