| 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_; |
nothing calls this directly
no test coverage detected