Calculate optimal size according to the number of distinct values and false positive probability. @param ndv The number of distinct values. @param fpp The false positive probability. @return it always return a value between kMinimumBloomFilterBytes and kMaximumBloomFilterBytes, and the return value is always a power of 2
| 230 | /// @return it always return a value between kMinimumBloomFilterBytes and |
| 231 | /// kMaximumBloomFilterBytes, and the return value is always a power of 2 |
| 232 | static uint32_t OptimalNumOfBytes(uint32_t ndv, double fpp) { |
| 233 | uint32_t optimal_num_of_bits = OptimalNumOfBits(ndv, fpp); |
| 234 | ARROW_DCHECK(::arrow::bit_util::IsMultipleOf8(optimal_num_of_bits)); |
| 235 | return optimal_num_of_bits >> 3; |
| 236 | } |
| 237 | |
| 238 | /// Calculate optimal size according to the number of distinct values and false |
| 239 | /// positive probability. |