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

Method PutBinaryDictionaryArray

cpp/src/parquet/encoder.cc:629–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627
628 template <typename ArrayType>
629 void PutBinaryDictionaryArray(const ArrayType& array) {
630 DCHECK_EQ(array.null_count(), 0);
631 for (int64_t i = 0; i < array.length(); i++) {
632 auto v = array.GetView(i);
633 if (ARROW_PREDICT_FALSE(v.size() > kMaxByteArraySize)) {
634 throw ParquetException(
635 "Parquet cannot store strings with size 2GB or more, got: ", v.size());
636 }
637 dict_encoded_size_ += static_cast<int>(v.size() + sizeof(uint32_t));
638 int32_t unused_memo_index;
639 PARQUET_THROW_NOT_OK(memo_table_.GetOrInsert(
640 v.data(), static_cast<int32_t>(v.size()), &unused_memo_index));
641 }
642 }
643
644 /// The number of bytes needed to encode the dictionary.
645 int dict_encoded_size_;

Callers

nothing calls this directly

Calls 7

ParquetExceptionFunction · 0.85
null_countMethod · 0.45
lengthMethod · 0.45
GetViewMethod · 0.45
sizeMethod · 0.45
GetOrInsertMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected