linhongliu-db opened a new pull request, #59883: URL: https://github.com/apache/spark/pull/59883
### What changes were proposed in this pull request? Normalize signed zero consistently when building and probing hash indexes for constant maps with FLOAT or DOUBLE keys, in both interpreted and generated evaluation. Preserve the first matching physical entry when a map contains both zero signs. ### Why are the changes needed? SQL equality treats `-0.0` and `0.0` as equal, but boxed floating-point keys and the existing hash calculation distinguish them. A lookup can therefore return a value with the linear strategy and NULL with the hash strategy. ### Does this PR introduce _any_ user-facing change? Yes. Looking up either zero sign now finds a stored key with either sign, consistently across lookup strategies. Ordinary keys, NaN, missing keys, and NULL lookups retain their existing behavior. ### How was this patch tested? Eight regression cases cover FLOAT and DOUBLE, either stored zero sign, both duplicate orders, forced hash and linear strategies, `GetMapValue` and `ElementAt`, interpreted and generated evaluation, and ordinary/NaN/missing/NULL controls. Full Catalyst suite passed: 33 tests, zero failures. The new regression cases failed against the unmodified production code. ```bash build/sbt 'catalyst/testOnly *ComplexTypeSuite' ``` Scala style checks passed for the Catalyst and SQL source and test code. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex CLI 0.164.0 (GPT-6) -- 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]
