You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Pereslegin (Jira)" <ji...@apache.org> on 2025/04/17 07:16:00 UTC

[jira] [Commented] (IGNITE-25174) Flaky ItCastToTsWithLocalTimeZoneTest

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

Pavel Pereslegin commented on IGNITE-25174:
-------------------------------------------

At least one of the failure occurs when converting TIME to TIMESTAMP WITH LOCAL TIME ZONE.
The problem may be in the code that creates the expected result.
{code:Java}
private static Instant localDateAndProvidedTimeAtOffset(LocalTime time, int offset) {
        ZoneOffset zone = ZoneOffset.ofHours(offset);

        // instead of this
        return LocalDateTime.of(LocalDate.now(zone), time).toInstant(zone);
        // I think we should construct a local date without passing the time zone.
        return LocalDateTime.of(LocalDate.now(), time).toInstant(zone);
    }
{code}
but it is necessary to analyze this issue more carefully.



> Flaky ItCastToTsWithLocalTimeZoneTest
> -------------------------------------
>
>                 Key: IGNITE-25174
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25174
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Iurii Gerzhedovich
>            Priority: Major
>              Labels: ignite-3
>
>  
>  At least the following tests are flaky:
> {noformat}
> org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest
>     explicitCastOfDynParamsOnMultiInsert
>     explicitCastOfLiteralsOnMultiInsert
>     explicitCastOfSourceTableOnInsert
>     explicitCastOfSourceTableOnSelect
> org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest: explicitCastOfDynParamsOnSelect(Object, int, Object): org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest
>     explicitCastOfDynParamsOnSelect([10] 12:00, 8, 2025-04-17T04:00:00Z)
>     explicitCastOfDynParamsOnSelect([9] 12:00, 4, 2025-04-17T08:00:00Z)
> org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest: explicitCastOfLiteralsOnInsert(String, int, Object): org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest:
>     explicitCastOfLiteralsOnInsert([10] time '12:00:00', 8, 2025-04-17T04:00:00Z)
>     explicitCastOfLiteralsOnInsert([9] time '12:00:00', 4, 2025-04-17T08:00:00Z)
> org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest: explicitCastOfLiteralsOnSelect(String, int, Object): org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest:
>     explicitCastOfLiteralsOnSelect([10] time '12:00:00', 8, 2025-04-17T04:00:00Z)
>     explicitCastOfLiteralsOnSelect([9] time '12:00:00', 4, 2025-04-17T08:00:00Z)
> org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest: explicitCastOfDynParamsOnInsert(Object, int, Object): org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest:
>     explicitCastOfDynParamsOnInsert([10] 12:00, 8, 2025-04-17T04:00:00Z)
>     explicitCastOfDynParamsOnInsert([9] 12:00, 4, 2025-04-17T08:00:00Z)
> {noformat}
>  
> Examples of failure:
> {code:java}
> org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
> Expected: 2025-04-17T04:00:00Z <class java.time.Instant>
> Actual:   2025-04-16T04:00:00Z <class java.time.Instant>
> org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
> Expected: 2025-04-17T04:00:00Z <class java.time.Instant>
> Actual:   2025-04-16T04:00:00Z <class java.time.Instant>
>   at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
>   at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryChecker.assertEqualsCollections(QueryChecker.java:195)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryChecker.assertEqualsCollections(QueryChecker.java:190)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerImpl$RowByRowResultChecker.check(QueryCheckerImpl.java:533)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerImpl.check(QueryCheckerImpl.java:383)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerFactoryImpl$1.check(QueryCheckerFactoryImpl.java:90)
>   at app//org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest.explicitCastOfDynParamsOnMultiInsert(ItCastToTsWithLocalTimeZoneTest.java:211)
>   at java.base@17.0.6/java.lang.reflect.Method.invoke(Method.java:568)
>   at java.base@17.0.6/java.util.ArrayList.forEach(ArrayList.java:1511)
>   at java.base@17.0.6/java.util.ArrayList.forEach(ArrayList.java:1511)
> {code}
> {code:java}
> org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
> Expected: 2025-04-17T08:00:00Z <class java.time.Instant>
> Actual:   2025-04-16T08:00:00Z <class java.time.Instant>
> org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
> Expected: 2025-04-17T08:00:00Z <class java.time.Instant>
> Actual:   2025-04-16T08:00:00Z <class java.time.Instant>
>   at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
>   at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryChecker.assertEqualsCollections(QueryChecker.java:195)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryChecker.assertEqualsCollections(QueryChecker.java:190)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerImpl$RowByRowResultChecker.check(QueryCheckerImpl.java:533)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerImpl.check(QueryCheckerImpl.java:383)
>   at app//org.apache.ignite.internal.sql.engine.util.QueryCheckerFactoryImpl$1.check(QueryCheckerFactoryImpl.java:90)
>   at app//org.apache.ignite.internal.sql.engine.datatypes.ItCastToTsWithLocalTimeZoneTest.explicitCastOfDynParamsOnInsert(ItCastToTsWithLocalTimeZoneTest.java:153)
> {code}
>  
>  



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