Skip to content

[CALCITE-6344] RelToSqlConverter invalid quotation for arrays and item operator(ansi dialect)#5065

Merged
xuzifu666 merged 1 commit into
apache:mainfrom
xuzifu666:calcite-6344
Jul 3, 2026
Merged

[CALCITE-6344] RelToSqlConverter invalid quotation for arrays and item operator(ansi dialect)#5065
xuzifu666 merged 1 commit into
apache:mainfrom
xuzifu666:calcite-6344

Conversation

@xuzifu666

Copy link
Copy Markdown
Member

jira: https://issues.apache.org/jira/browse/CALCITE-6344

The SQL generated by the dialect has been verified in PostgreSQL (the pre-fix version would have resulted in errors):https://onecompiler.com/postgresql/44tvwz86e

* SqlItemOperator fails in RelToSqlConverter</a>. */
@Test void testSqlItemOperator() {
sql("SELECT foo[0].\"EXPR$1\" FROM (SELECT ARRAY[ROW('a', 'b')] AS foo)")
.ok("SELECT \"ARRAY[ROW('a', 'b')][0]\".\"EXPR$1\"\n"

@xuzifu666 xuzifu666 Jul 1, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SQL statements like this will cause an error in PostgreSQL, we can the last sql in https://onecompiler.com/postgresql/44tvwz86e

@asolimando asolimando left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@xuzifu666 xuzifu666 added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jul 2, 2026
@xuzifu666 xuzifu666 merged commit c455453 into apache:main Jul 3, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants