[
https://issues.apache.org/jira/browse/CALCITE-6100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784594#comment-17784594
]
Julian Hyde edited comment on CALCITE-6100 at 11/9/23 8:05 PM:
---------------------------------------------------------------
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.
In fact, can you obsolete {{SqlEqualsDeepTest}} and move everything into
{{SqlNodeTest}}.
was (Author: julianhyde):
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)