Test Trino bloom filters with the opposite sign of zero
Compare keys at one snapshot to check whether a bloom filter drops an oppositely signed zero that SQL treats as equal. Matching counts can conceal changed identities, so reconcile key sets with pruning enabled and disabled.
Align SQL equality and pruning
Zeros that compare equal in SQL must not exclude each other during bloom pruning. Truthound Core can compare the selected keys from the same files with a separately established zero-equality reference. [1, 2, 3]
A zero-bit membership report
Trino issue #31905 reports Parquet and ORC bloom filters hashing -0.0 and 0.0 as different values on 485-SNAPSHOT. The SQL comparison treats them as equal. The report distinguishes default Parquet bloom use from the ORC setting that enables it. [1]
Compare one snapshot
Compare bloom-enabled and bloom-disabled key sets for the same snapshot. Store the original zero sign, predicate, and format. If only the opposite-sign predicate loses a key, pause that pruning path rather than rewriting all source zeros without approval. [1, 3]
The expected z key
Define key z=-0e0, with other keys at 1e0 and 3e0. Under SQL -0e0=0, x=0 expects set z. Returning z passes; empty fails. This is membership equality, not a demand that all engines impose the same total ordering on signed zero. [1, 3]
Compare exported key sets
DistinctValuesEqualSetValidator in Truthound Core Python SDK 3.3.2 compares the exported key column with expected_values. The operator establishes snapshot and predicate semantics. The SDK does not alter bloom hashes or prove another engine’s zero ordering. [1, 2, 3]
Verify the alternate path
Check a bloom-disabled path for affected queries and validate a supported reader with no selected-key loss. Keep format and setting differences visible when interpreting that control. [1, 3]
Identity is stronger than count
A row-count summary may expose this one-row fixture, but actual key reconciliation is stronger for larger datasets. A correct total can still conceal one missing zero replaced by another row. [1, 3]
Application conditions
Preserve zero signs and bloom settings for the same files and snapshot.
Alternatives
Check a bloom-disabled control and a supported reader without missing keys.
Limitations
Do not confuse SQL zero equality with another engine’s total ordering.
Evidence
- Event checked
- Subject checked
- Modified
