| 232 | } // namespace |
| 233 | |
| 234 | BlockSplitBloomFilter BlockSplitBloomFilter::DeserializeEncrypted( |
| 235 | const ReaderProperties& properties, ArrowInputStream* input, |
| 236 | std::optional<int64_t> bloom_filter_length, Decryptor* decryptor, |
| 237 | int16_t row_group_ordinal, int16_t column_ordinal) { |
| 238 | if (decryptor == nullptr) { |
| 239 | throw ParquetException("Bloom filter decryptor must be provided"); |
| 240 | } |
| 241 | |
| 242 | // Read the full Bloom filter payload up front when the total length is known. |
| 243 | if (bloom_filter_length.has_value()) { |
| 244 | PARQUET_ASSIGN_OR_THROW(auto bloom_filter_buf, input->Read(*bloom_filter_length)); |
| 245 | CheckBloomFilterShortRead(*bloom_filter_length, bloom_filter_buf->size(), |
| 246 | "Bloom filter"); |
| 247 | ::arrow::io::BufferReader reader(bloom_filter_buf); |
| 248 | return DeserializeEncryptedFromStream(properties, &reader, bloom_filter_length, |
| 249 | decryptor, row_group_ordinal, column_ordinal); |
| 250 | } |
| 251 | |
| 252 | return DeserializeEncryptedFromStream(properties, input, bloom_filter_length, decryptor, |
| 253 | row_group_ordinal, column_ordinal); |
| 254 | } |
| 255 | |
| 256 | BlockSplitBloomFilter BlockSplitBloomFilter::Deserialize( |
| 257 | const ReaderProperties& properties, ArrowInputStream* input, |
nothing calls this directly
no test coverage detected