Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CALCITE-5044] Rewrite numberic constant in the sort to avoid rel_to_sql ambiguity #2749

Closed
wants to merge 3 commits into from

Conversation

wojustme
Copy link
Contributor

@wojustme wojustme commented Mar 22, 2022

Rewrite numberic constant in the sort to avoid rel_to_sql ambiguity
of 'SqlConformance#isSortByOrdinal'.

Link to JIRA: https://issues.apache.org/jira/browse/CALCITE-5044

@wojustme wojustme changed the title [CALCITE-4772] Define a dialect's switch to remove constant literal in the sort [CALCITE-5044] Define a dialect's switch to remove constant literal in the sort Mar 22, 2022
@wojustme wojustme changed the title [CALCITE-5044] Define a dialect's switch to remove constant literal in the sort [CALCITE-5044] Rewrite numberic constant in the sort to avoid rel_to_sql ambiguity Mar 23, 2022
…BY, which some dialects wrongly interpret as a reference to a field

When an ORDER BY field turns out to be an integer literal,
if the target dialect treats ordinals as field references,
RelToRelConverter now generates a character literal
instead. All constants have no effect on the sort, and
therefore the character literal has the desired effect.

Close apache#2749
julianhyde pushed a commit to julianhyde/calcite that referenced this pull request Mar 25, 2022
…ich some dialects wrongly interpret as a reference to a field

When an ORDER BY field turns out to be an integer literal,
if the target dialect treats ordinals as field references,
RelToRelConverter now generates a character literal
instead. All constants have no effect on the sort, and
therefore the character literal has the desired effect.

Close apache#2749
aymeric-dispa pushed a commit to aymeric-dispa/calcite that referenced this pull request Jul 23, 2022
…ich some dialects wrongly interpret as a reference to a field

When an ORDER BY field turns out to be an integer literal,
if the target dialect treats ordinals as field references,
RelToRelConverter now generates a character literal
instead. All constants have no effect on the sort, and
therefore the character literal has the desired effect.

Close apache#2749
tanclary pushed a commit to tanclary/calcite that referenced this pull request Nov 11, 2022
…ich some dialects wrongly interpret as a reference to a field

When an ORDER BY field turns out to be an integer literal,
if the target dialect treats ordinals as field references,
RelToRelConverter now generates a character literal
instead. All constants have no effect on the sort, and
therefore the character literal has the desired effect.

Close apache#2749
tanclary pushed a commit to tanclary/calcite that referenced this pull request Nov 28, 2022
…ich some dialects wrongly interpret as a reference to a field

When an ORDER BY field turns out to be an integer literal,
if the target dialect treats ordinals as field references,
RelToRelConverter now generates a character literal
instead. All constants have no effect on the sort, and
therefore the character literal has the desired effect.

Close apache#2749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants