File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,22 +117,16 @@ class ARROW_EXPORT ArrayBuilder {
117117 // / \brief Return true if value at index is valid (not null). Does not
118118 // / boundscheck.
119119 // / Note that this method does not work for types that do not have a
120- // / top-level validity bitmap ( Union and Run-End Encoded (RLE) types).
120+ // / top-level validity bitmap (Union and Run-End Encoded (RLE) types).
121121 bool IsValid (int64_t i) const {
122- if (type ()->id () == Type::NA ) {
123- return false ;
124- } else if (type ()->id () == Type::SPARSE_UNION ) {
125- // Not implemented
126- return false ;
127- } else if (type ()->id () == Type::DENSE_UNION ) {
128- // Not implemented
129- return false ;
130- } else if (type ()->id () == Type::RUN_END_ENCODED ) {
131- // Not implemented
132- return false ;
133- } else {
134- // NullType
135- return bit_util::GetBit (null_bitmap_builder_.data (), i);
122+ switch (type ()->id ()) {
123+ case Type::NA :
124+ case Type::SPARSE_UNION :
125+ case Type::DENSE_UNION :
126+ case Type::RUN_END_ENCODED :
127+ return false ;
128+ default :
129+ return bit_util::GetBit (null_bitmap_builder_.data (), i);
136130 }
137131 }
138132
You can’t perform that action at this time.
0 commit comments