Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[CALCITE-7778] JDBC adapter for MSSQL generates % for MOD without preserving grouping, giving wrong results - #5259

Open
wasabii wants to merge 2 commits into
apache:mainfrom
wasabii:calcite-7778-mssql-mod-grouping
Open

[CALCITE-7778] JDBC adapter for MSSQL generates % for MOD without preserving grouping, giving wrong results#5259
wasabii wants to merge 2 commits into
apache:mainfrom
wasabii:calcite-7778-mssql-mod-grouping

Conversation

@wasabii

@wasabii wasabii commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7778

Changes Proposed

Parenthesize the % written for MOD where its lower precedence requires it. Shared in RelToSqlConverterUtil rather than the dialect, since HiveSqlDialect makes the same substitution and somebody might want to fix that also some day.

@sonarqubecloud

Copy link
Copy Markdown

* operator before the dialect is consulted, so an operator that binds less
* tightly needs them added here.
*/
public static void unparseWithOperator(SqlWriter writer, SqlOperator operator,

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.

maybe this should be called "unparseWithBinaryOperator"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants