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

Method Put

cpp/src/parquet/encoder.cc:1667–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1665
1666 void Put(const T* buffer, int num_values) override;
1667 void Put(const ::arrow::Array& values) override {
1668 if (values.type_id() != ::arrow::Type::BOOL) {
1669 throw ParquetException("RleBooleanEncoder expects BooleanArray, got ",
1670 values.type()->ToString());
1671 }
1672 const auto& boolean_array = checked_cast<const ::arrow::BooleanArray&>(values);
1673 if (values.null_count() == 0) {
1674 for (int i = 0; i < boolean_array.length(); ++i) {
1675 // null_count == 0, so just call Value directly is ok.
1676 buffered_append_values_.push_back(boolean_array.Value(i));
1677 }
1678 } else {
1679 PARQUET_THROW_NOT_OK(::arrow::VisitArraySpanInline<::arrow::BooleanType>(
1680 *boolean_array.data(),
1681 [&](bool value) {
1682 buffered_append_values_.push_back(value);
1683 return Status::OK();
1684 },
1685 []() { return Status::OK(); }));
1686 }
1687 }
1688
1689 void PutSpaced(const T* src, int num_values, const uint8_t* valid_bits,
1690 int64_t valid_bits_offset) override {

Callers

nothing calls this directly

Calls 10

ParquetExceptionFunction · 0.85
push_backMethod · 0.80
OKFunction · 0.50
type_idMethod · 0.45
ToStringMethod · 0.45
typeMethod · 0.45
null_countMethod · 0.45
lengthMethod · 0.45
ValueMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected