Skip to content

test: add slt coverage for issues found during sqlparser upgrade - #27922

Merged
blaginin merged 4 commits into
apache:mainfrom
alamb:alamb/slt-keyword-identifiers
Dec 1, 2026
Merged

blaginin merged 4 commits into
apache:mainfrom
alamb:alamb/slt-keyword-identifiers

Conversation

@alamb

@alamb alamb commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

While testing the sqlparser upgrade in #27063, @blaginin found that SELECT * FROM only stopped working for a table named only. No test on main covered that query, so the regression was only found by hand.

What changes are included in this PR?

Only .slt tests, with no code changes:

What is the testing strategy for this PR?

This PR only adds tests, which record the current behavior on main.

Are there any user-facing changes?

No.

alamb and others added 3 commits December 1, 2026 16:02
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@alamb alamb changed the title test: add slt coverage for keywords used as unquoted identifiers test: add slt coverage for issues found during sqlparser upgrade Dec 1, 2026
query error DataFusion error: Schema error: No field named t\.y\. Did you mean 't\.x'\?\nValid fields are t\.x\.$
select * from (select 1 as x) t order by t.y;

# Unquoted `end` after a complete expression or relation is rejected

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agent got confused about this syntax so let's keep it explcit

SELECT current_user;

query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 20"\)
SELECT current_user();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These functions may change behavior so let's document what is happening

# Whether an unquoted keyword is accepted as an identifier is decided by
# sqlparser, so these queries are sensitive to sqlparser upgrades.

statement ok

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

New test for verifying the use of keywords as identifier

@alamb
alamb marked this pull request as ready for review December 1, 2026 21:19
@alamb
alamb requested a review from blaginin December 1, 2026 21:20

@blaginin blaginin 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.

🙏

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Dec 1, 2026
@blaginin
blaginin enabled auto-merge December 1, 2026 22:42
@blaginin
blaginin added this pull request to the merge queue Dec 1, 2026
Merged via the queue into apache:main with commit d829786 Dec 1, 2026
41 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt) v57.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants