| 716 | explicit PathBuilder(bool start_nullable) : nullable_in_parent_(start_nullable) {} |
| 717 | template <typename T> |
| 718 | void AddTerminalInfo(const T& array) { |
| 719 | info_.leaf_is_nullable = nullable_in_parent_; |
| 720 | if (nullable_in_parent_) { |
| 721 | info_.max_def_level++; |
| 722 | } |
| 723 | // We don't use null_count() because if the null_count isn't known |
| 724 | // and the array does in fact contain nulls, we will end up |
| 725 | // traversing the null bitmap twice (once here and once when calculating |
| 726 | // rep/def levels). |
| 727 | if (LazyNoNulls(array)) { |
| 728 | info_.path.emplace_back(AllPresentTerminalNode{info_.max_def_level}); |
| 729 | } else if (LazyNullCount(array) == array.length()) { |
| 730 | info_.path.emplace_back(AllNullsTerminalNode(info_.max_def_level - 1)); |
| 731 | } else { |
| 732 | info_.path.emplace_back(NullableTerminalNode(array.null_bitmap_data(), |
| 733 | array.offset(), info_.max_def_level)); |
| 734 | } |
| 735 | info_.primitive_array = std::make_shared<T>(array.data()); |
| 736 | paths_.push_back(Fixup(info_)); |
| 737 | } |
| 738 | |
| 739 | template <typename T> |
| 740 | ::arrow::enable_if_t<std::is_base_of<::arrow::FlatArray, T>::value, Status> Visit( |
nothing calls this directly
no test coverage detected