Skip to content

[CALCITE-7777] JDBC adapter generates || for concatenation, which SQL Server rejects - #5258

Open
wasabii wants to merge 1 commit into
apache:mainfrom
wasabii:calcite-7777-mssql-concat
Open

[CALCITE-7777] JDBC adapter generates || for concatenation, which SQL Server rejects#5258
wasabii wants to merge 1 commit into
apache:mainfrom
wasabii:calcite-7777-mssql-concat

Conversation

@wasabii

@wasabii wasabii commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7777

Changes Proposed

MssqlSqlDialect writes the || operator as +. SQL Server has no ||, and + is the only rendering that keeps what || means: it propagates NULL, where the CONCAT function reads a NULL operand as the empty string and would turn a NULL result into a row.

@sonarqubecloud

Copy link
Copy Markdown

@mihaibudiu mihaibudiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I hope that the precedence is right for the operator

@mihaibudiu mihaibudiu added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Sep 12, 2026
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.

2 participants