You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause: the grammar has no production for the T-SQL OPTION (...) query hint clause, so any statement carrying one fails to parse.
PR #2472 adds it: OPTION (...) at the end of SELECT (including after set operations and FOR XML), UPDATE and DELETE parses into a new OptionClause holding OptionHints (keyword name + optional value or argument list). The statement from this issue parses into PlainSelect with MAXRECURSION 2 accessible from the AST and deparse round-trips unchanged; all query hint forms currently documented by Microsoft parse as well, and option stays a non-reserved keyword usable as column and table name.
Activity
feat: support SQL Server OPTION query hints (JSQLParser#161)
fudianchn commentedon Aug 15, 2026
Root cause: the grammar has no production for the T-SQL
OPTION (...)query hint clause, so any statement carrying one fails to parse.PR #2472 adds it:
OPTION (...)at the end ofSELECT(including after set operations andFOR XML),UPDATEandDELETEparses into a newOptionClauseholdingOptionHints (keyword name + optional value or argument list). The statement from this issue parses intoPlainSelectwithMAXRECURSION 2accessible from the AST and deparse round-trips unchanged; all query hint forms currently documented by Microsoft parse as well, andoptionstays a non-reserved keyword usable as column and table name.feat: support SQL Server OPTION query hints (#161) (#2472)