pitrou opened a new issue, #547:
URL: https://github.com/apache/parquet-format/issues/547

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The bits/key values in [this 
table](https://github.com/apache/parquet-format/blob/master/BloomFilter.md#sizing-an-sbbf)
 do not seem to match results given by the formula used in the [Parquet 
C++](https://github.com/apache/arrow/blob/a1ec5a9a1decb163eef26deecf60a6903f9aa125/cpp/src/parquet/bloom_filter.h#L237)
 and [Parquet 
Java](https://github.com/apache/parquet-java/blob/aa41aa121ff29e360273675edc899ba1c2640047/parquet-column/src/main/java/org/apache/parquet/column/values/bloomfilter/BlockSplitBloomFilter.java#L286)
 implementations.
   
   Using that formula (the same in both implementations) I get this table:
   
   | Bits of space per `insert` | False positive probability |
   | -------------------------- | -------------------------- |
   |                        5.8 | 10 %                       |
   |                        9.7 |  1 %                       |
   |                       14.6 |  0.1 %                     |
   |                       21   |  0.01 %                    |
   |                       29.6  |  0.001 %                   |
   
   In Python:
   ```python
   >>> fpp = 0.1 ; 8/math.log(1/(1 - fpp**0.125))
   5.7725418439029506
   >>> fpp = 0.01 ; 8/math.log(1/(1 - fpp**0.125))
   9.681526738735679
   >>> fpp = 0.001 ; 8/math.log(1/(1 - fpp**0.125))
   14.607697478479535
   >>> fpp = 0.0001 ; 8/math.log(1/(1 - fpp**0.125))
   21.045409233894773
   >>> fpp = 0.00001 ; 8/math.log(1/(1 - fpp**0.125))
   29.555488704606017
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to