[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2017-08-02 Thread Alexandr Fedotov (JIRA)

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

Alexandr Fedotov edited comment on IGNITE-4172 at 8/2/17 8:15 PM:
--

Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. {{java.time.LocalTime}} is stored as {{java.sql.Time}}, 
{{java.time.LocalDate}} as {{java.sql.Date}},  {{LocalDateTime}}  as 
{{Timestamp}}.
Having, for example, {{IgniteCache}} where {{Person}} has a 
{{java.time.LocalDateTime}} field, trying to select that field with a query like
{code:sql}select locDateTime from Person{code}
will return {{java.sql.Timestamp}} value.



was (Author: asfedotov):
Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. {{java.time.LocalTime}} is stored as {{java.sql.Time}}, 
{{java.time.LocalDate}} as {{java.sql.Date}},  {{LocalDateTime}}  as 
{{Timestamp}}.
Having, for example, {{IgniteCache}} where {{Person}} has a 
{{java.time.LocalDateTime}} field, trying to select that field with a query like
{{select locDateTime from Person}} will return {{java.sql.Timestamp}} value.


> 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
>Reporter: Andrew Mashenkov
>Assignee: Alexandr Fedotov
> Fix For: 2.2
>
>
> 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;
> Startpoint is IgniteH2Indexing.wrap() method. 
> We need add support to these classes: LocalDate, LocalTime, LocalDateTime.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2017-08-02 Thread Alexandr Fedotov (JIRA)

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

Alexandr Fedotov edited comment on IGNITE-4172 at 8/2/17 8:13 PM:
--

Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. {{java.time.LocalTime}} is stored as {{java.sql.Time}}, 
{{java.time.LocalDate}} as {{java.sql.Date}},  {{LocalDateTime}}  as 
{{Timestamp}}.
Having, for example, {{IgniteCache}} where {{Person}} has a 
{{java.time.LocalDateTime}} field, trying to select that field with a query like
{{select locDateTime from Person}} will return {{java.sql.Timestamp}} value.



was (Author: asfedotov):
Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. {{java.time.LocalTime}} is stored as {{java.sql.Time}}, 
{{java.time.LocalDate}} as {{java.sql.Date}},  {{LocalDateTime}}  as 
{{Timestamp}}.
Having, for example, {{IgniteCache}} where {{Person}} has a 
{{java.time.LocalDateTime}} field, trying to select that field with a query 
like  {{select locDateTime from Person}} will return {{java.sql.Timestamp}} 
value.


> 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
>Reporter: Andrew Mashenkov
>Assignee: Alexandr Fedotov
> Fix For: 2.2
>
>
> 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;
> Startpoint is IgniteH2Indexing.wrap() method. 
> We need add support to these classes: LocalDate, LocalTime, LocalDateTime.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2017-08-02 Thread Alexandr Fedotov (JIRA)

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

Alexandr Fedotov edited comment on IGNITE-4172 at 8/2/17 8:12 PM:
--

Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. {{java.time.LocalTime}} is stored as {{java.sql.Time}}, 
{{java.time.LocalDate}} as {{java.sql.Date}},  {{LocalDateTime}}  as 
{{Timestamp}}.
Having, for example, {{IgniteCache}} where {{Person}} has a 
{{java.time.LocalDateTime}} field, trying to select that field with a query 
like  {{select locDateTime from Person}} will return {{java.sql.Timestamp}} 
value.



was (Author: asfedotov):
Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. LocalDateTime is stored as Timestamp, which should be accounted when 
applying a custom SQL functions. Probably that's a tradeoff for the moment.


> 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
>Reporter: Andrew Mashenkov
>Assignee: Alexandr Fedotov
> Fix For: 2.2
>
>
> 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;
> Startpoint is IgniteH2Indexing.wrap() method. 
> We need add support to these classes: LocalDate, LocalTime, LocalDateTime.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2017-08-02 Thread Alexandr Fedotov (JIRA)

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

Alexandr Fedotov edited comment on IGNITE-4172 at 8/2/17 10:14 AM:
---

Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. LocalDateTime is stored as Timestamp, which should be accounted when 
applying a custom SQL functions. Probably that's a tradeoff for the moment.



was (Author: asfedotov):
Apart from the improvements introduced by 
[IGNITE-5483|https://issues.apache.org/jira/browse/IGNITE-5483] the following 
should be addressed:
1. {{java.time.LocalTime}}, {{java.time.LocalDate}}, 
{{java.time.LocalDateTime}} are not supported as cache values or keys.
2. LocalDateTime is stored as Timestamp, which should be accounted when 
applying a custom SQL functions.


> 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
>Reporter: Andrew Mashenkov
>Assignee: Alexandr Fedotov
> Fix For: 2.2
>
>
> 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;
> Startpoint is IgniteH2Indexing.wrap() method. 
> We need add support to these classes: LocalDate, LocalTime, LocalDateTime.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2016-11-08 Thread Andrew Mashenkov (JIRA)

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

Andrew Mashenkov edited comment on IGNITE-4172 at 11/8/16 9:45 AM:
---

I've changed IgniteH2Indexing.wrap() method to support LocalDateTime class. But 
query result contains java.sql.TimeStamp objects instead of 
java.time.LocalDateTime, due to H2 does not support java8 time api. 

Java8 time objects support will be added in next H2 version. 
To resolve this we need to update H2 version, so this ticket is deferred to 
ignite 2.0.

As a workaround, custom function can be used to convert types.



was (Author: amashenkov):
I've changed IgniteH2Indexing.wrap() method to support LocalDateTime class. But 
query result contains java.sql.TimeStamp objects instead of 
java.time.LocalDateTime, due to H2 does not support java8 time api. 

Java8 time objects support will be added in next H2 version. 
To resolve this we need to update H2 version, so this ticket is deferred to 
ignite 2.0.

> 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: 2.0
>
>
> 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
(v6.3.4#6332)


[jira] [Comment Edited] (IGNITE-4172) SQL: Add support for Java 8 Time API classes in date\time functions

2016-11-08 Thread Andrew Mashenkov (JIRA)

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

Andrew Mashenkov edited comment on IGNITE-4172 at 11/8/16 9:42 AM:
---

I've changed IgniteH2Indexing.wrap() method to support LocalDateTime class. But 
query result contains java.sql.TimeStamp objects instead of 
java.time.LocalDateTime, due to H2 does not support java8 time api. 

Java8 time objects support will be added in next H2 version. 
To resolve this we need to update H2 version, so this ticket is deferred to 
ignite 2.0.


was (Author: amashenkov):
I've changed IgniteH2Indexing.wrap() method to support LocalDateTime class. All 
works fine for me.

But SQL query result contains java.sql.TimeStamp objects instead of 
java.time.LocalDateTime, that may be not obvious to user. 
In H2 future version java8 time objects support will be added. I saw H2 code 
and it seems we will face same issue after update dependency.

Thoughts?

> 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: 2.0
>
>
> 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
(v6.3.4#6332)