yashmayya commented on PR #14089:
URL: https://github.com/apache/pinot/pull/14089#issuecomment-2378874424
> Even if we cast after getting the result, it might already lose precision
and give inaccurate result.
Yes, this is a valid point. Also, an expression like `5 / 3 + 1.5` will
re
Jackie-Jiang commented on PR #14089:
URL: https://github.com/apache/pinot/pull/14089#issuecomment-2378087511
Basically we want a general way so that we can add standard SQL support
without breaking existing v1 queries
--
This is an automated message from the Apache Git Service.
To respond
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, `20 + 200
Jackie-Jiang commented on PR #14089:
URL: https://github.com/apache/pinot/pull/14089#issuecomment-2377437825
Per the PG behavior:
https://www.postgresql.org/docs/current/functions-math.html
Should it return INT for operations between INT columns?
Good catch on the division function beh
yashmayya commented on code in PR #14089:
URL: https://github.com/apache/pinot/pull/14089#discussion_r1777085061
##
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/arithmetic/PolymorphicBinaryArithmeticScalarFunction.java:
##
@@ -0,0 +1,72 @@
+/**
+ * Licensed
codecov-commenter commented on PR #14089:
URL: https://github.com/apache/pinot/pull/14089#issuecomment-2376742572
##
[Codecov](https://app.codecov.io/gh/apache/pinot/pull/14089?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&u
yashmayya commented on PR #14089:
URL: https://github.com/apache/pinot/pull/14089#issuecomment-2376653624
I've removed the polymorphic division function implementation because that
breaks backward compatibility for the v1 query engine. `select 1 / 2 from
mytable` currently returns `0.5` in