Skip to content

Recognize CROSS APPLY and OUTER APPLY - #928

Open
radixun wants to merge 1 commit into
andialbrecht:masterfrom
radixun:fix/apply-operators
Open

radixun wants to merge 1 commit into
andialbrecht:masterfrom
radixun:fix/apply-operators

Conversation

@radixun

@radixun radixun commented Oct 9, 2026

Copy link
Copy Markdown

Fixes #300.

Recognize SQL Server's CROSS APPLY and OUTER APPLY as compound keywords. Previously, keyword_case='upper' left apply unchanged. Parsing also grouped apply with the next table-valued function and separated the function from its alias.

Add tests for both operators, case changes, whitespace, table-source boundaries, identifiers and quoted text. Keep standalone apply as an identifier.

  • Tests: 547 passed, 2 xfailed, 1 xpassed on Linux with Python 3.14.4. The xfail and xpass results also occur on the base.
  • Ruff: ruff check sqlparse/ tests/test_apply.py.
  • Regression tests cover the change.
  • Add a changelog entry.

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.

SqlServer operator CROSS APPLY

1 participant