ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Mashenkov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions
Date Thu, 03 Nov 2016 17:37:58 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633582#comment-15633582

Andrew Mashenkov commented on IGNITE-4172:

H2 converts object to Timestamp right before provide it to DateDiff function as an argument.

I've found that H2 does not support LocalDateTime class and try it as a String when converting
to Timestamp.
But LocalDateTime.toString() method can return result in different format. Short time format
is used for object with zero-time setted. H2 parser does not support shot time format and
throws an error.

Object with zero-time toString() returns smth like this: 2016-11-01T00:00 
But with non-zero-time: 2016-11-01T22:07:19.547

> SQL: Add support for Java 8 Time API classes in date\time functions
> -------------------------------------------------------------------
>                 Key: IGNITE-4172
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4172
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.6, 1.7
>            Reporter: Andrew Mashenkov
>            Assignee: Andrew Mashenkov
>             Fix For: 1.8
> We have is issue with querying LocalDateTime objects with our SQL engine. 
> Next query can fails with error, if one of row localDateTimeField value has zero-time:

> select DATEDIFF('DAY', localDateTimeField, CURRENT_DATE ()) from t;
> It seems H2 do not support ISO-8601 short time format "HH:mm". We need workaround here.

This message was sent by Atlassian JIRA

View raw message