Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Capture filegroup and filestream names before calling parseIdentifier to ensure correct evaluation order in struct initialization.

Enables Baselines120_CreateTableTests120 test.

claude added 22 commits January 4, 2026 21:16
Capture filegroup and filestream names before calling parseIdentifier
to ensure correct evaluation order in struct initialization.

Enables Baselines120_CreateTableTests120 test.
- Add CreateExternalResourcePoolStatement AST type
- Add parsing for CREATE EXTERNAL RESOURCE POOL with parameters
- Support MAX_CPU_PERCENT, MAX_MEMORY_PERCENT, MAX_PROCESSES, AFFINITY
- Support AFFINITY CPU/NUMANODE with AUTO or range lists
- Add JSON marshaling for the new statement type

Enables CreateExternalResourcePoolStatementTests130 tests.
- Add TrimOptions field to FunctionCall AST type
- Parse LEADING, TRAILING, BOTH keywords before TRIM characters
- Add JSON marshaling for TrimOptions

Enables TrimFunctionTests160 tests.
- Add TAPE device type support in FROM clause
- Add FILELISTONLY, VERIFYONLY, LABELONLY, REWINDONLY, HEADERONLY kinds
- Add MOVE restore option parsing (MOVE 'file' TO 'path')
- Add FILE, MEDIANAME, MEDIAPASSWORD, PASSWORD, STOPAT options
- Add ENABLE_BROKER, ERROR_BROKER_CONVERSATIONS, NEW_BROKER options
- Add KEEP_REPLICATION, RESTRICTED_USER options
- Fix STATS option to handle optional value (STATS or STATS = n)
- Update MoveRestoreOption to use ScalarExpression types

Enables RestoreStatementTests tests.
Handle HASH keyword without preceding NONCLUSTERED in table-level inline
index definitions. When HASH appears directly after UNIQUE, it is now
correctly interpreted as NonClusteredHash index type.
Add parsing for OPENROWSET with named parameters (PROVIDER, CONNECTION,
OBJECT, CREDENTIAL) for Cosmos DB integration, and traditional OPENROWSET
syntax with positional arguments ('provider', 'connstr', tablename).

New AST types: OpenRowsetCosmos, OpenRowsetTableReference,
LiteralOpenRowsetCosmosOption, OpenRowsetColumnDefinition
Handle optional AS keyword in function parameter syntax like
@param AS datatype. This applies to CREATE FUNCTION, ALTER FUNCTION,
and CREATE OR ALTER FUNCTION statements.
Add WithColumns field to BulkOpenRowset for schema specification in
OPENROWSET BULK statements. Supports COLLATE clause and column ordinal
or JSON path specifications.
Support both T-SQL table hint syntaxes:
1. Old-style: table_name (nolock) AS alias - hints before alias
2. New-style: table_name AS alias WITH (hints) - alias before hints

The parser now correctly handles both patterns by checking for old-style
hints first (parentheses without WITH), then parsing alias, then checking
for new-style hints (WITH keyword followed by parentheses).
Add parsing for:
- CREATE LOGIN with PASSWORD, WINDOWS, CERTIFICATE, ASYMMETRIC KEY sources
- ALTER LOGIN ENABLE/DISABLE statements
- ALTER LOGIN WITH options (PASSWORD, NO CREDENTIAL, etc.)
- DROP LOGIN statement

Add new AST types:
- PasswordCreateLoginSource, WindowsCreateLoginSource
- CertificateCreateLoginSource, AsymmetricKeyCreateLoginSource
- AlterLoginEnableDisableStatement, AlterLoginOptionsStatement
- DropLoginStatement, OnOffPrincipalOption, PrincipalOptionSimple

Update PasswordAlterPrincipalOption to support both String and Binary passwords.
- Add IsIfExists field to DropLoginStatement
- Fix national string handling: strip N prefix and quotes from value
- Enable LoginStatementTests and Baselines90_LoginStatementTests
- Added DROP PARTITION FUNCTION/SCHEME, DROP APPLICATION ROLE,
  DROP CERTIFICATE, DROP MASTER KEY, DROP XML SCHEMA COLLECTION,
  DROP CONTRACT, DROP ENDPOINT, DROP MESSAGE TYPE, DROP QUEUE,
  DROP REMOTE SERVICE BINDING, DROP ROUTE, DROP SERVICE,
  DROP EVENT NOTIFICATION statements
- Added WITH NO DEPENDENTS option for DROP ASSEMBLY
- Added MAXDOP option for DROP INDEX
- Added DropBehavior (Cascade/Restrict) for DROP SCHEMA
- Added marshaling for DropFullTextCatalogStatement and
  DropFulltextIndexStatement
- Enabled Baselines90_DropStatementsTests2 and DropStatementsTests2 tests
- Add CHANGETABLE(CHANGES) and CHANGETABLE(VERSION) parsing
- Add InlineDerivedTable for VALUES clause in FROM
- Add GlobalFunctionTableReference for STRING_SPLIT and GENERATE_SERIES
- Add Alias and Columns support for table function references

Enables: Baselines150_FromClauseTests150, FromClauseTests150,
Baselines160_BuiltInFunctionTests160, BuiltInFunctionTests160
- Add AuditActionSpecification and DatabaseAuditAction types
- Add DropDatabaseAuditSpecificationStatement
- Update parseAuditSpecificationPart to handle action specs
- Add batch group mappings (BatchCompletedGroup, BatchStartedGroup)

Enables: DatabaseAuditSpecificationStatementTests (all 4 variants)
- Add DATA_COMPRESSION parsing to columnstore index WITH clause
- Add DataCompressionOption case to columnStoreIndexOptionToJSON

Enables: CreateIndexStatementTests120 (both variants)
- Add XmlCompressionOption and TableXmlCompressionOption types
- Add XML_COMPRESSION parsing in CREATE TABLE WITH clause
- Add partition ranges support for XML compression

Part of work towards CreateTableTests160
…TABLE

- Add TableDistributionOption and TableHashDistributionPolicy AST types
- Add TableIndexOption, TableClusteredIndexType, and TableNonClusteredIndexType AST types
- Parse DISTRIBUTION = HASH(col1, col2, ...) in CREATE TABLE WITH clause
- Parse CLUSTERED INDEX(col), CLUSTERED COLUMNSTORE INDEX, and HEAP options
- Add JSON marshaling for all new table option types
- Enables Baselines160_CreateTableTests160 and CreateTableTests160 tests
- Add WindowClause and WindowDefinition AST types for SELECT WINDOW clause
- Add WindowFrameClause and WindowDelimiter AST types for ROWS/RANGE frames
- Add WindowName field to OverClause for window name references (OVER Win1)
- Create parseOverClause helper function and refactor all OVER parsing
- Add parseWindowClause for WINDOW Win1 AS (...) syntax
- Add parseWindowFrameClause for ROWS/RANGE BETWEEN ... AND ...
- Add JSON marshaling for all new window-related types
- Add WINDOW to reserved keyword lists for alias detection
- Enables Baselines160_WindowClauseTests160, WindowClauseTests160,
  Baselines110_OverClauseTests110, and OverClauseTests110 tests
- Support parenthesized list for FILE = ('f1', 'f2') and FILEGROUP = ('fg1', 'fg2')
- Add all BACKUP option kind mappings (BlockSize, BufferCount, Description, etc.)
- Enables BaselinesCommon_BackupStatementTests and BackupStatementTests tests
…E INDEX

- Add OnlineIndexLowPriorityLockWaitOption AST type with LowPriorityLockWaitOption field
- Parse ONLINE = ON (WAIT_AT_LOW_PRIORITY (MAX_DURATION = N MINUTES, ABORT_AFTER_WAIT = SELF))
- Add XmlCompressionOption indexOption() method for index options
- Parse XML_COMPRESSION = ON/OFF [ON PARTITIONS(range)] in CREATE INDEX
- Add JSON marshaling for OnlineIndexOption with LowPriorityLockWaitOption
- Add JSON marshaling for XmlCompressionOption in index context

Enables Baselines160_CreateIndexStatementTests160 and CreateIndexStatementTests160.
- Add DataModificationTableReference AST for DML statements as table sources
- Add DataModificationSpecification interface implemented by Insert/Update/Delete/MergeSpecification
- Add parsing for INSERT/UPDATE/DELETE/MERGE in FROM clause subqueries
- Add parseInsertSpecification, parseUpdateSpecification, parseDeleteSpecification, parseMergeSpecification
- Add PivotedTableReference and UnpivotedTableReference AST types
- Add PIVOT and UNPIVOT parsing in parseTableReference
- Fix PIVOT/UNPIVOT being consumed as table aliases
- Add JSON marshaling for new table reference types

This is partial work toward Baselines100_FromClauseTests100 which still requires
FORCESEEK hints with index/columns and TABLE HINT optimizer hints.
- Add ForceSeekTableHint AST type for FORCESEEK with optional index and column parameters
- Add FORCESEEK parsing with index name/number and column list support
- Add FORCESCAN to table hint kind mapping
- Add JSON marshaling for ForceSeekTableHint
- Enable Baselines100_FromClauseTests100 test
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.

3 participants