MCPcopy Create free account
hub / github.com/apache/arrow / AddTerminalInfo

Method AddTerminalInfo

cpp/src/parquet/arrow/path_internal.cc:718–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 10

LazyNoNullsFunction · 0.85
LazyNullCountFunction · 0.85
FixupFunction · 0.85
emplace_backMethod · 0.80
push_backMethod · 0.80
lengthMethod · 0.45
offsetMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected