You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (Jira)" <ji...@apache.org> on 2019/10/21 16:05:00 UTC
[jira] [Updated] (IGNITE-12312) JDBC thin: it's not possible to use
LocalDate/LocalTime/LocalDateTime as value in where _key=.
[ https://issues.apache.org/jira/browse/IGNITE-12312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Lapin updated IGNITE-12312:
-------------------------------------
Description:
JDBC thin: it's not possible to use LocalDateTime (converted internally to java.sql.Timestamp) as value in where _key=<Timestamp>.
In case of following query
{code:java}
stmt.executeQuery("SELECT * FROM " + tableName +" where _key >= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS') and _key <= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')");{code}
expected row would be returned, however in case of
{code:java}
stmt.executeQuery("SELECT * FROM " + tableName +" where _key = PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')");{code}
no rows would be returned.
Reproducers:
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateTimeDataType
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalTimeDataType
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateDataType
was:
JDBC thin: it's not possible to use LocalDateTime (converted internally to java.sql.Timestamp) as value in where _key=<Timestamp>.
In case of following query
{color:#172b4d}{{stmt.{color:#172b4d}executeQuery{color}({color:#36b37e}"SELECT * FROM "{color} + tableName +{color:#36b37e}" where _key >= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS') and _key <= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')"{color});}}{color}
expected row would be returned, however in case of
{color:#172b4d}{{stmt.{color:#172b4d}executeQuery{color}({color:#36b37e}"SELECT * FROM "{color} + tableName +{color:#36b37e}" where _key = PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')"{color});}}{color}
no rows would be returned.
Reproducers:
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateTimeDataType
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalTimeDataType
org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateDataType
> JDBC thin: it's not possible to use LocalDate/LocalTime/LocalDateTime as value in where _key=<value>.
> -----------------------------------------------------------------------------------------------------
>
> Key: IGNITE-12312
> URL: https://issues.apache.org/jira/browse/IGNITE-12312
> Project: Ignite
> Issue Type: Bug
> Reporter: Alexander Lapin
> Priority: Major
>
> JDBC thin: it's not possible to use LocalDateTime (converted internally to java.sql.Timestamp) as value in where _key=<Timestamp>.
> In case of following query
>
> {code:java}
> stmt.executeQuery("SELECT * FROM " + tableName +" where _key >= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS') and _key <= PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')");{code}
>
> expected row would be returned, however in case of
>
> {code:java}
> stmt.executeQuery("SELECT * FROM " + tableName +" where _key = PARSEDATETIME('2019-09-05 17:43:01.144', 'yyyy-MM-dd HH:mm:ss.SSS')");{code}
> no rows would be returned.
> Reproducers:
> org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateTimeDataType
> org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalTimeDataType
> org.apache.ignite.jdbc.thin.JdbcThinCacheToJdbcDataTypesCoverageTest#testLocalDateDataType
--
This message was sent by Atlassian Jira
(v8.3.4#803005)