yashmayya opened a new pull request, #16993: URL: https://github.com/apache/pinot/pull/16993
- Currently, `NaN` and `+/- Infinity` handling is inconsistent for `ROUND_DECIMAL`. - The scalar function version with a single argument currently returns 0 for `NaN`, `Long.MIN_VALUE` for `-Infinity` and `Long.MAX_VALUE` for `+Infinity` based on Java's `Math.round(double)` behavior. - The scalar function version with two arguments fails for `NaN` and `+/- Infinity` because they can't be converted to `BigDecimal`. - This patch fixes `ROUND_DECIMAL` scalar and transform function implementations (both 1 and 2 argument versions) to handle `NaN` and `+/- Infinity` in a standard way following PostgreSQL behavior - the values are simply returned as is. -- 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]
