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

Method WriteTo

cpp/src/parquet/bloom_filter.cc:323–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void BlockSplitBloomFilter::WriteTo(ArrowOutputStream* sink) const {
324 DCHECK(sink != nullptr);
325
326 format::BloomFilterHeader header;
327 if (ARROW_PREDICT_FALSE(algorithm_ != BloomFilter::Algorithm::BLOCK)) {
328 throw ParquetException("BloomFilter does not support Algorithm other than BLOCK");
329 }
330 header.algorithm.__set_BLOCK(format::SplitBlockAlgorithm());
331 if (ARROW_PREDICT_FALSE(hash_strategy_ != HashStrategy::XXHASH)) {
332 throw ParquetException("BloomFilter does not support Hash other than XXHASH");
333 }
334 header.hash.__set_XXHASH(format::XxHash());
335 if (ARROW_PREDICT_FALSE(compression_strategy_ != CompressionStrategy::UNCOMPRESSED)) {
336 throw ParquetException(
337 "BloomFilter does not support Compression other than UNCOMPRESSED");
338 }
339 header.compression.__set_UNCOMPRESSED(format::Uncompressed());
340 header.__set_numBytes(num_bytes_);
341
342 ThriftSerializer serializer;
343 serializer.Serialize(&header, sink);
344
345 PARQUET_THROW_NOT_OK(sink->Write(data_->data(), num_bytes_));
346}
347
348bool BlockSplitBloomFilter::FindHash(uint64_t hash) const {
349 const uint32_t bucket_index =

Callers

nothing calls this directly

Calls 11

ParquetExceptionFunction · 0.85
SplitBlockAlgorithmClass · 0.85
XxHashClass · 0.85
UncompressedClass · 0.85
__set_BLOCKMethod · 0.80
__set_XXHASHMethod · 0.80
__set_UNCOMPRESSEDMethod · 0.80
__set_numBytesMethod · 0.80
SerializeMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected