You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Liya Fan (Jira)" <ji...@apache.org> on 2022/03/16 01:43:00 UTC

[jira] [Resolved] (CALCITE-5040) SqlTypeFactoryTest.testUnknownCreateWithNullabilityTypeConsistency fails

     [ https://issues.apache.org/jira/browse/CALCITE-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Liya Fan resolved CALCITE-5040.
-------------------------------
    Resolution: Resolved

Fixed in [https://github.com/apache/calcite/commit/692b8f0886a25538e010d1a8ae5efe89f80d89e9.] Thanks for the PR, [~julianhyde] 

> SqlTypeFactoryTest.testUnknownCreateWithNullabilityTypeConsistency fails
> ------------------------------------------------------------------------
>
>                 Key: CALCITE-5040
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5040
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Stamatis Zampetakis
>            Assignee: Julian Hyde
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.30.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When run during the build ({{./gradlew clean build}}) the test fails intermittently but when it is executed individually it always fails. 
> {code:bash}
> ./gradlew cleanTest :core:test --tests SqlTypeFactoryTest.testUnknownCreateWithNullabilityTypeConsistency
> {code}
> Stacktrace
> {noformat}
> java.lang.AssertionError: 
> Expected: is an instance of org.apache.calcite.sql.type.SqlTypeFactoryImpl$UnknownSqlType
>      but: <UNKNOWN> is a org.apache.calcite.sql.type.BasicSqlType
> 	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
> 	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
> 	at org.apache.calcite.sql.type.SqlTypeFactoryTest.testUnknownCreateWithNullabilityTypeConsistency(SqlTypeFactoryTest.java:296)
> {noformat}
> Due to type canonization in [RelDataTypeFactory|https://github.com/apache/calcite/blob/170035fd97df1afdd0c0a499f63e0ca1606f7837/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java#L405] the class of the created type is not the expected one.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)