LuciferYang opened a new pull request, #10554: URL: https://github.com/apache/paimon/pull/10554
### Purpose close #10553 - Spark DATE: `SparkHilbertUDF` cast the date to bigint, which fails analysis under ANSI mode and gives null otherwise. It now takes the days since epoch, the same value `HilbertIndexer` reads for a DATE field. - FLOAT and DOUBLE: the curve reads only the low 63 bits of each coordinate, so the raw IEEE bits lost the sign and `x` and `-x` shared a curve position. `HilbertIndexer.doubleToOrderedLong` flips the bits the way z-order does and shifts them into the 63-bit domain; the indexer and the Spark UDF both use it. The other types keep their mapping, so existing hilbert orders on integer columns do not change. ### Tests - `HilbertIndexerTest#testFloatingPointKeysKeepTheSign`: `x` and `-x` get different keys, and over an 8x8 grid of signed values one coordinate changes sign once along the sorted order. - `SparkHilbertUDFTest#testDateColumnMapsToEpochDay`: dates from year 1 to 9999 and null map to their epoch day and the null sentinel, with ANSI on and off. - `CompactProcedureTestBase`: `sys.compact` with `order_strategy => 'hilbert'` on a DATE column under ANSI mode, and on two DOUBLE columns with both signs. ### API and Format no ### Documentation no Generated-by: Claude Opus -- 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]
