You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2022/06/16 12:02:00 UTC
[jira] [Resolved] (IGNITE-17169) ItFunctionsTest.testCurrentDateTimeTimeStamp fails due different format of string representation
[ https://issues.apache.org/jira/browse/IGNITE-17169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov resolved IGNITE-17169.
---------------------------------------
Resolution: Duplicate
> ItFunctionsTest.testCurrentDateTimeTimeStamp fails due different format of string representation
> ------------------------------------------------------------------------------------------------
>
> Key: IGNITE-17169
> URL: https://issues.apache.org/jira/browse/IGNITE-17169
> Project: Ignite
> Issue Type: Bug
> Reporter: Vyacheslav Koptilin
> Priority: Blocker
> Labels: ignite-3
>
> ItFunctionsTest.testCurrentDateTimeTimeStamp fails with the following error:
> {noformat}
> org.opentest4j.AssertionFailedError: strEnd: 2022-06-14 21:40:43.917, strRes=2022-06-14T21:40:43.895 ==>
> Expected :true
> Actual :false
> <Click to see difference>
> at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
> at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
> at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
> at org.apache.ignite.internal.sql.engine.ItFunctionsTest.checkDateTimeQuery(ItFunctionsTest.java:97)
> at org.apache.ignite.internal.sql.engine.ItFunctionsTest.testCurrentDateTimeTimeStamp(ItFunctionsTest.java:67)
> {noformat}
> The root cause of the issue is that the following sql _SELECT CURRENT_TIMESTAMP_ returns _LocalDateTime_ instead of _Timestamp_. These classes have different string representations.
> _Timestamp_ returns a timestamp in JDBC timestamp escape format. {@code yyyy-mm-dd hh:mm:ss.fffffffff}
> _LocalDateTime_ returns date-time in the ISO-8601 format {@code uuuu-MM-dd'T'HH:mm:ss}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)