stoty commented on a change in pull request #150:
URL: https://github.com/apache/calcite-avatica/pull/150#discussion_r697158036
##########
File path:
core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java
##########
@@ -722,13 +701,21 @@ protected Number getNumber() throws SQLException {
return (Number) super.getObject();
}
+ //FIXME There are several problems with this, the code below simply
implements
+ //a previous behaviour codified by the Calcite test suite.
+ //
+ // 1. It interprets a scale of 0 as a NOOP parameter, it should in fact
drop all fractionals
Review comment:
My theory is that 0 is exlcuded because there is no easy way to tell if
the column metadata received does not specify a scale, or if if it does does
specify a scale, and it is 0.
Based on my tests, the current code seems to come into play when aggregation
results are processed, which - I guess - are returned as FLOAT or similar, but
with columnmetadata.scale of the original NUMERIC/DECIMAL field.
The funnly thing is that is done ONLY for that case, and ONLY for
getBigDecimal()
--
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]