| 144 | constexpr uint32_t kBloomFilterHeaderSizeGuess = 256; |
| 145 | |
| 146 | ::arrow::Status ValidateBloomFilterHeader(const format::BloomFilterHeader& header) { |
| 147 | if (!header.algorithm.__isset.BLOCK) { |
| 148 | return ::arrow::Status::Invalid( |
| 149 | "Unsupported Bloom filter algorithm: ", header.algorithm, "."); |
| 150 | } |
| 151 | |
| 152 | if (!header.hash.__isset.XXHASH) { |
| 153 | return ::arrow::Status::Invalid("Unsupported Bloom filter hash: ", header.hash, "."); |
| 154 | } |
| 155 | |
| 156 | if (!header.compression.__isset.UNCOMPRESSED) { |
| 157 | return ::arrow::Status::Invalid( |
| 158 | "Unsupported Bloom filter compression: ", header.compression, "."); |
| 159 | } |
| 160 | |
| 161 | if (header.numBytes <= 0 || |
| 162 | static_cast<uint32_t>(header.numBytes) > BloomFilter::kMaximumBloomFilterBytes) { |
| 163 | std::stringstream ss; |
| 164 | ss << "Bloom filter size is incorrect: " << header.numBytes << ". Must be in range (" |
| 165 | << 0 << ", " << BloomFilter::kMaximumBloomFilterBytes << "]."; |
| 166 | return ::arrow::Status::Invalid(ss.str()); |
| 167 | } |
| 168 | |
| 169 | return ::arrow::Status::OK(); |
| 170 | } |
| 171 | |
| 172 | BlockSplitBloomFilter DeserializeEncryptedFromStream( |
| 173 | const ReaderProperties& properties, ArrowInputStream* input, |
no test coverage detected