mihaibudiu commented on code in PR #3733:
URL: https://github.com/apache/calcite/pull/3733#discussion_r1573886834
##########
core/src/test/java/org/apache/calcite/test/InterpreterTest.java:
##########
@@ -579,7 +579,7 @@ private static void assertRows(Interpreter interpreter,
final String sql = "select x, min(y), max(y), sum(y), avg(y)\n"
+ "from (values ('a', -1.2), ('a', 2.3), ('a', 15)) as t(x, y)\n"
+ "group by x";
- sql(sql).returnsRows("[a, -1.2, 15.0, 16.1, 5.366666666666667]");
+ sql(sql).returnsRows("[a, -1.2, 15.0, 16.1, 5.3]");
Review Comment:
@snuyanzin I have written extensive comments about the rounding mode in
Calcite in several places, e.g.
https://issues.apache.org/jira/browse/CALCITE-6322
I don't like this choice myself, but it's consistent in how Calcite handles
rounding elsewhere.
If we want to change this we should first (1) write a spec about the
semantics of casts in Calcite, (2) implement it consistently everywhere.
--
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]