You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Canonicalize floating-point NaN values for Java compatibility #256
I searched the existing issues and found nothing similar.
Paimon-cpp version
main at 4027601e.
Minimal reproduce step
Construct float or double NaN values with different sign or payload bits.
Use those values in Literal hashing, Bloom filter hashing, Hive bucket hashing, BTree keys, Variant values, global-index scores, or indexed-split scores.
Compare the generated hashes or serialized bytes with Java Paimon, which canonicalizes NaN through Float.floatToIntBits and Double.doubleToLongBits.
What doesn't meet your expectations?
C++ currently preserves raw NaN payload bits in several hashing and serialization paths. As a result, NaN values that compare as equivalent can produce different hashes, and C++ can emit bytes that differ from Java.
All float NaN values should use canonical bits 0x7fc00000, and all double NaN values should use canonical bits 0x7ff8000000000000, while preserving every non-NaN value unchanged.
Activity