gianm opened a new pull request, #18181: URL: https://github.com/apache/druid/pull/18181
Row-based frames had an incorrect sort order for certain float and double values. The problem was an incorrect transformation in TransformUtils from natural form to bits-sortable form. The now-legacy transformation compares the sign and exponents properly for negative numbers, but compares significands backwards, so if two negative floats have the same exponent they sort backwards. It is fixed by flipping all bits for negative numbers, instead of just the sign bit and exponent bits. The main change is in TransformUtils, where the following methods gain a `FrameType` parameter: `transformFromDouble`, `detransformToDouble`, `transformFromFloat`, and `detransformToFloat`. With frame type `ROW_BASED_V1`, the legacy transformation is used; with `ROW_BASED_V2` the correct transformation is used. All other changes are to support rolling updates. Because older code and newer code may coexist during a job, a context parameter `rowBasedFrameType` (default V1) is added. It's set to V2 on the Broker, because the Broker is updated after all data servers. By the time the Broker updates, it is safe to use the new type. Users do not need to set this property directly, nor should they. -- 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]
