You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/11/09 20:04:00 UTC

[jira] [Commented] (CALCITE-6100) The equalsDeep of SqlRowTypeNameSpec returns wrong result

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

Julian Hyde commented on CALCITE-6100:
--------------------------------------

Can you change the summary to describe what it should return? (And therefore, implicitly, what is wrong with the current behavior.)
 
Not your fault, but the existing {{assertEqualsDeep}} method gets the arguments in the wrong order. Can you remove it, and replace with {{assertThat}} throughout.

> The equalsDeep of SqlRowTypeNameSpec returns wrong result
> ---------------------------------------------------------
>
>                 Key: CALCITE-6100
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6100
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.35.0, 1.36.0
>            Reporter: Dmitry Sysolyatin
>            Assignee: Dmitry Sysolyatin
>            Priority: Major
>              Labels: pull-request-available
>
> SqlRowTypeNameSpec#equalsDeep method uses reference comparison for objects inside fieldTypes list instead of using SqlDataTypeSpec#equalsDeep.
> Testcase: Add to `SqlEqualsDeepTest` the following lines of code:
> {code:java}
> @Test
> void testRowEqualsDeep() throws SqlParseException {
> assertEqualsDeep("CAST(a AS ROW(field INTEGER))",
> "CAST(a AS ROW(field INTEGER))", true);
> }
> {code}



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