Skip to content

Add support for Query Hints for MS Fabric in TSql170Parser (#180)#212

Open
ZEUSXXIV wants to merge 1 commit into
microsoft:mainfrom
ZEUSXXIV:feature/fabric-query-hints
Open

Add support for Query Hints for MS Fabric in TSql170Parser (#180)#212
ZEUSXXIV wants to merge 1 commit into
microsoft:mainfrom
ZEUSXXIV:feature/fabric-query-hints

Conversation

@ZEUSXXIV

Copy link
Copy Markdown
Contributor

Description

Fixes #180.

Adds support for MS Fabric query hints (FOR TIMESTAMP AS OF '<literal>', FORCE SINGLE NODE PLAN, and FORCE DISTRIBUTED PLAN) in TSql170Parser, TSql180Parser, and TSqlFabricDWParser. These hints are mapped to AST enums (ForceSingleNodePlan, ForceDistributedPlan, ForTimestampAsOf) and handled appropriately in the T-SQL parser grammar and script generator visitor. Includes new regression unit test coverage.

Code Changes

@llali

llali commented Jul 16, 2026

Copy link
Copy Markdown
Member

M1 — Positive-only test coverage; no negative / version-gating assertions.
FabricQueryHints170.sql only exercises the happy path. The repo's testing guidelines call for negative coverage. Because older versions are null (ignored), the test also doesn't lock in that pre-170 parsers reject this syntax. Recommend adding a negative case to ParserErrorsTests.cs (e.g. FORCE SINGLE PLAN missing NODE, or FOR TIMESTAMP AS OF without a string literal) and/or an nErrors160: 1 assertion to pin version gating.

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

please add negative tests. everything else look good

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.

Add support for Query Hints for MS Fabric in TSql170Parser

2 participants