Will Noble created CALCITE-5535:
-----------------------------------
Summary: Time values are not properly truncated
Key: CALCITE-5535
URL: https://issues.apache.org/jira/browse/CALCITE-5535
Project: Calcite
Issue Type: Bug
Components: avatica
Reporter: Will Noble
Avatica [uses the binary modulo
operator|https://github.com/apache/calcite-avatica/blob/810acf80771310431d7ef576f3404299ebb8eaf2/core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java#L1164]
to truncate time values by the number of milliseconds in a day, but this
operator can result in negative numbers. We should use {{Math.floorMod()}}
instead. There are also places where numbers are not truncated at all, such as
when [converting to
string|https://github.com/apache/calcite-avatica/blob/810acf80771310431d7ef576f3404299ebb8eaf2/core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java#L262].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)