yashmayya commented on PR #14089: URL: https://github.com/apache/pinot/pull/14089#issuecomment-2377446516
> Should it return INT for operations between INT columns? Ideally yes, but that would break backward compatibility too (just like the division case). In PG, `2000000000 + 2000000000` returns `ERROR: integer out of range` whereas in Pinot it returns `4000000000`. > Good catch on the division function behavior difference. In order to move towards standard SQL behavior without breaking backward compatibility, we can consider adding a query option to follow standard SQL. This way we can keep v1 behavior and also make v2 standard SQL compatible. V1 user can also migrate to standard SQL behavior. Do you mean a specific query option for arithmetic related operations or just a generic option under which we'd bucket all such compatibility breaking but SQL compliant changes in the future? Also, the v2 behavior should already be SQL compliant because Calcite will make sure that the return type for the division operator is appropriate (and Pinot makes sure to cast internal values based on the expected return type of an operator). -- 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]
