Skip to content

fix(sql): ordering by alphanumeric columns that start with a number#5408

Merged
bluestreak01 merged 6 commits intomasterfrom
nw_order_by_alphanumeric_named_columns
Feb 28, 2025
Merged

fix(sql): ordering by alphanumeric columns that start with a number#5408
bluestreak01 merged 6 commits intomasterfrom
nw_order_by_alphanumeric_named_columns

Conversation

@nwoolmer
Copy link
Copy Markdown
Contributor

Fixes #5407

When rewriting queries that use positional order by (i.e. ORDER BY 1, 2), column names that started with a number were mistakenly interpreted as numbers. Then, they would fail to parse to an integer.

Now, the code first verifies that it is truly numeric. If not, it will fall out and not attempt to rewrite from positional order by to a named order by.

@nwoolmer nwoolmer added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels Feb 20, 2025
@nwoolmer nwoolmer changed the title fix(sql): ordering by columns that start with a number fix(sql): ordering by alphanumeric columns that start with a number Feb 20, 2025
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 0 / 0 (0%)

@bluestreak01 bluestreak01 merged commit 1a525a4 into master Feb 28, 2025
37 checks passed
@bluestreak01 bluestreak01 deleted the nw_order_by_alphanumeric_named_columns branch February 28, 2025 20:16
jerrinot pushed a commit that referenced this pull request Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot order by columns that start with a number, but are not numbers

3 participants