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

Method Put

cpp/src/parquet/encoder.cc:1669–1689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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