Will Noble created CALCITE-5250:
-----------------------------------

             Summary: Possible bug in date conversion
                 Key: CALCITE-5250
                 URL: https://issues.apache.org/jira/browse/CALCITE-5250
             Project: Calcite
          Issue Type: Bug
          Components: avatica
    Affects Versions: 1.22.0
            Reporter: Will Noble
            Assignee: Will Noble


In 
[DateFromNumberAccessor.getDate()|https://github.com/apache/calcite-avatica/blob/d88f91a3ed8590ab8cee0df5c53633b3d5e41c59/core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java#L929]
 we multiply the number by {{{}MILLIS_PER_DAY{}}}. However, I'm observing that 
the integer values being sent over the wire (using the JsonHandler) are already 
expressed in milliseconds since epoch, as seen in 
[DateSerializer._timestamp()|https://github.com/FasterXML/jackson-databind/blob/b688919010a9147376dc435f742812afd5b46885/src/main/java/com/fasterxml/jackson/databind/ser/std/DateSerializer.java#L41]
 in jackson-databind (java.util.date.getTime returns time in milliseconds). So, 
the returned dates are super far in the future.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to