[ 
https://issues.apache.org/jira/browse/CALCITE-5341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679467#comment-17679467
 ] 

Julian Hyde commented on CALCITE-5341:
--------------------------------------

[~freastro], Upgrading from Avatica 1.22 to 1.23 breaks Calcite:
{noformat}
$ diff -u10 core/build/resources/test/sql/misc.iq 
core/build/resources/test/sql/surefire/sql/misc.iq
@@ -2162,34 +2162,34 @@
 # [CALCITE-1054] NPE caused by wrong code generation for Timestamp fields
 select "sqlTimestamp" as T
 from "everyTypes"
 where "sqlTimestamp" >= {ts '1969-01-01 00:00:00'}
 and "sqlTimestamp" < {ts '1998-01-01 00:00:00'};
 +---------------------+
 | T                   |
 +---------------------+
-| 1970-01-01 00:00:00 |
+| 1969-12-31 16:00:00 |
 +---------------------+
 (1 row)
 
 !ok
 
 # [CALCITE-1188] NullPointerException in EXTRACT with WHERE ... IN clause if 
field has null value
 select "sqlTimestamp" T
 from "everyTypes"
 where extract(YEAR from "sqlTimestamp") IN (1969, 1970);
 +---------------------+
 | T                   |
 +---------------------+
-| 1970-01-01 00:00:00 |
+| 1969-12-31 16:00:00 |
 +---------------------+
 (1 row)
 
 !ok{noformat}

I believe the changes in how {{java.sql.Timestamp}} is converted to {{long}} 
are responsible. Can you take a look, please?

> Upgrade Calcite to Avatica 1.23.0
> ---------------------------------
>
>                 Key: CALCITE-5341
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5341
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Stamatis Zampetakis
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.33.0
>
>
> Upgrade Calcite to Avatica 1.23.0 when it becomes available.



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

Reply via email to