GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — feat: support SQL Server OPTION query hints (#161) by fudianchn · Pull Request #2472 · JSQLParser/JSqlParser Conversation
Contributor
WhatAdds support for the SQL Server (T-SQL) WhyThe grammar has no production for query hints (#161), so statements like How
Root causeMissing feature: the grammar has no production for the T-SQL query hint clause, so such statements always threw a Testing
Verification of the original issueBefore (master Grammar change, paired
In both pairs the delta (+0.6%) is smaller than the combined confidence interval -> not statistically significant, no regression. Limitation: T-SQL also allows Fixes #161
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsParse the T-SQL OPTION (...) clause at the end of SELECT (including after
set operations and FOR XML), UPDATE and DELETE statements, following the
Query Hints documentation: multi-word keyword hints (RECOMPILE, HASH
JOIN, FORCE ORDER, OPTIMIZE FOR UNKNOWN, ...), single value arguments
(FAST 100, MAXDOP 4, MAX_GRANT_PERCENT = 25) and parenthesized argument
lists (USE HINT ('...'), OPTIMIZE FOR (@p = 1), TABLE HINT (t, INDEX
(i))).
Hints are kept in a generic OptionHint (keyword name + optional value or
ExpressionList parameters) attached via a new OptionClause, mirroring
how SQL Server keeps adding new hints without enum churn. OPTION is a
non-reserved keyword and K_OPTION followed by ( is excluded from alias
positions, so option remains usable as a column and table name. The
union hoisting lifts the clause from the last PlainSelect onto the
SetOperationList like ORDER BY and LIMIT.
Signed-off-by: 付典 <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. add support for SQL Server Query HintsUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |