-
Notifications
You must be signed in to change notification settings - Fork 0
Add NONCLUSTERED HASH and BUCKET_COUNT support for constraints #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
kyleconroy
commented
Jan 1, 2026
- Parse HASH suffix after NONCLUSTERED in column-level and table-level constraints
- Parse WITH (BUCKET_COUNT = N) index options for PRIMARY KEY and UNIQUE constraints
- Add MEMORY_OPTIMIZED table option parsing for CREATE TABLE
- Fix Clustered field output in JSON - only emit for non-hash index types
- Enable Baselines120_UniqueConstraintTests120 and UniqueConstraintTests120 tests
- Parse HASH suffix after NONCLUSTERED in column-level and table-level constraints - Parse WITH (BUCKET_COUNT = N) index options for PRIMARY KEY and UNIQUE constraints - Add MEMORY_OPTIMIZED table option parsing for CREATE TABLE - Fix Clustered field output in JSON - only emit for non-hash index types - Enable Baselines120_UniqueConstraintTests120 and UniqueConstraintTests120 tests
Convert query.sql from UTF-16LE to UTF-8 to enable proper parsing.
- Add COMPRESS_ALL_ROW_GROUPS option mapping for ALTER INDEX REORGANIZE - Implement CompressionDelayIndexOption parsing with TimeUnit support - Handle MINUTE/MINUTES time unit suffix for COMPRESSION_DELAY - Enable Baselines130_AlterIndexStatementTests130 and AlterIndexStatementTests130 tests
- Add parseCreateMaterializedViewStatement for MATERIALIZED VIEW parsing - Add ViewOption interface with ViewStatementOption, ViewDistributionOption, and ViewForAppendOption types - Parse DISTRIBUTION = HASH(columns) and FOR_APPEND options - Use $ref for duplicate identifiers in DistributionColumns - Enable MaterializedViewTests130/140/150/160 and Baselines* variants
Handle pseudo columns in INSERT column list with proper ColumnType: - $ACTION -> PseudoColumnAction - $CUID -> PseudoColumnCuid - $ROWGUID -> PseudoColumnRowGuid Enable Baselines100_InsertStatementTests100 and InsertStatementTests100 tests.
- Update parseCreateEventSessionStatementFromEvent to fully parse the statement - Add JSON marshalling for EventDeclaration, TargetDeclaration, SessionOption types - Add EventDeclarationCompareFunctionParameter as BooleanExpression for predicate parsing - Add SourceDeclaration as both ScalarExpression and BooleanExpression - Add sourceDeclarationToJSON helper function - Enable 7 CreateEventSessionNotLikePredicate tests
- Add Partitions and OrderByClause fields to OverClause AST type - Update OVER clause parser to handle PARTITION BY and ORDER BY - Add overClauseToJSON function for proper marshalling - Enable 4 WithinGroupTests (130, 140, both baseline and regular)
- Convert query.sql from UTF-16 to UTF-8 encoding - Add isStatementTerminator() check to parser loop to properly separate statements without semicolons
- Convert query.sql from UTF-16 to UTF-8 encoding
- Add OnFileGroupOrPartitionScheme field to CreateColumnStoreIndexStatement - Parse DROP_EXISTING and MAXDOP index options - Add IndexExpressionOption marshalling to columnStoreIndexOptionToJSON - Parse ON filegroup/partition scheme clause for COLUMNSTORE indexes Enables 2 tests: CreateIndexStatementTests110, Baselines110_CreateIndexStatementTests110
- Create EndConversationStatement AST type with Conversation, WithCleanup, ErrorCode, and ErrorDescription fields - Add parseEndConversationStatement function to handle END CONVERSATION with optional WITH ERROR/WITH CLEANUP clauses - Update TryCatch, BeginEndBlock, and statement list parsing to properly distinguish END CONVERSATION from block-terminating END keyword - Add JSON marshalling for EndConversationStatement Enables 2 tests: EndConversationStatementTests, Baselines90_EndConversationStatementTests
- Add Collation field to FunctionCall and ColumnReferenceExpression AST types - Parse COLLATE clause after expressions in SELECT elements - Add COLLATE to excluded alias keywords to prevent misinterpretation - Update marshalling for both FunctionCall and ColumnReferenceExpression to include Collation field in JSON output Enables 4 tests: SelectWithCollation, Baselines110/120/130_SelectWithCollation
- Add ColumnStorageOptions struct to AST with IsFileStream and SparseOption - Add StorageOptions field to ColumnDefinition - Parse SPARSE, FILESTREAM, COLUMN_SET FOR ALL_SPARSE_COLUMNS in column definitions - Also parse ROWGUIDCOL, HIDDEN, MASKED column attributes - Add columnStorageOptionsToJSON for marshalling Enables 2 tests: ColumnDefinitionTests100, Baselines100_ColumnDefinitionTests100
- Add TopRowFilter, OutputClause, OutputIntoClause fields to DeleteSpecification - Parse TOP (expression) [PERCENT] clause in DELETE statement - Parse OUTPUT and OUTPUT INTO clauses in DELETE statement - Update deleteSpecificationToJSON to marshal new fields Enables 2 tests: DeleteStatementTests90, Baselines90_DeleteStatementTests90
Parse NONCLUSTERED/CLUSTERED index type, column list with ASC/DESC sort order, and INCLUDE clause for inline index definitions in CREATE TABLE column definitions.
Support Service Broker statements: - BEGIN DIALOG [CONVERSATION] with FROM/TO SERVICE clauses - WITH options: RELATED_CONVERSATION, RELATED_CONVERSATION_GROUP, ENCRYPTION, LIFETIME - BEGIN CONVERSATION TIMER with TIMEOUT
- Add LOB_COMPACTION to option kind mapping for LobCompaction - Use IgnoreDupKeyIndexOption type for IGNORE_DUP_KEY option - Add missing LiteralType for IntegerLiteral in index options
Support source types (FROM ASSEMBLY, FROM FILE, FROM EXECUTABLE FILE), AUTHORIZATION, WITH PRIVATE KEY options (FILE, DECRYPTION BY PASSWORD, ENCRYPTION BY PASSWORD), certificate options (SUBJECT, START_DATE, EXPIRY_DATE), and ACTIVE FOR BEGIN_DIALOG.
- Add IdentityFunctionCall AST type for IDENTITY(data_type [, seed, increment]) - Add parsing for IDENTITY function calls - Add handling for IDENTITYCOL and ROWGUIDCOL column types in expressions - Handle multi-part identifiers with empty parts (e.g., master..t1.IDENTITYCOL) - Fix national string handling in column aliases (AS N'alias') - Add JSON marshaling for IdentityFunctionCall This enables the BaselinesCommon_SelectExpressionTests test.
- Add CreateOrAlterProcedureStatement AST type - Add CreateOrAlterTriggerStatement AST type - Add CreateOrAlterViewStatement AST type - Update parsing to return correct CreateOrAlter types - Add JSON marshaling for all three new types This enables 2 tests: Baselines130_CreateOrAlterStatementTests130 and CreateOrAlterStatementTests130.
- Add parseCreateIndexOptions80Style function for old-style syntax without parentheses - Handle WITH FILLFACTOR = 23, PAD_INDEX style options - Set Translated80SyntaxTo90 = true for old-style syntax - Use IndexStateOption for IGNORE_DUP_KEY in SQL 80 style This enables 2 tests: Baselines80_CreateIndexStatementTests and CreateIndexStatementTests.
- Add named parameters (@name = value) support - Add DEFAULT keyword as parameter value - Add OUTPUT modifier on parameters - Add procedure numbers (;1 suffix) parsing - Add OPENDATASOURCE/OPENROWSET ad-hoc data source support - Add IdentifierLiteral for bare identifier parameters - Fix DefaultLiteral to include LiteralType field - Add AdHocDataSource AST type and JSON marshaling Enables BaselinesCommon_ExecuteStatementTests
- Allow computed columns with PERSISTED to have inline constraints (NOT NULL, CHECK, FOREIGN KEY, PRIMARY KEY) - Add FOREIGN KEY inline constraint parsing for columns - Add ForeignKeyConstraintDefinition.constraintDefinition() method - Use parseFileGroupOrPartitionScheme for CREATE TABLE ON clause (supports partition scheme column lists) - Parse XML CONTENT/DOCUMENT directive as XmlDataTypeOption Enables Baselines90_CreateTableTests90
Convert UTF-16 LE encoded input files to UTF-8 when the BOM (0xFF 0xFE) is detected at the start of the input. This allows parsing of test files that are encoded in UTF-16 Little Endian format. Enables AlterProcedureStatementTests
- Handle TRIM(chars FROM string) syntax where FROM acts as parameter separator instead of comma - Add COLLATE clause support for function calls in parsePostExpressionAccess Enables Baselines140_TrimBuiltInTest140
- Add WaitAtLowPriorityOption AST type for WAIT_AT_LOW_PRIORITY clause - Add LowPriorityLockWaitMaxDurationOption for MAX_DURATION = N MINUTES - Add LowPriorityLockWaitAbortAfterWaitOption for ABORT_AFTER_WAIT - Parse WAIT_AT_LOW_PRIORITY with nested options in parentheses - Add JSON marshaling for all new option types Enables DropIndexStatementTests140, Baselines140_DropIndexStatementTests140
- Add double-quoted identifier support for data types like "xml" - Add multi-word type names: CHAR VARYING -> VarChar, DOUBLE PRECISION -> Float - Add multi-part type names for user-defined types (dbo.mytype, db.schema.type) - Add parameter parsing for user-defined types (mytype(10), mytype(max)) - Add Parameters field marshaling to userDataTypeReferenceToJSON Enables ScalarDataTypeTests90 and Baselines90_ScalarDataTypeTests90 tests.
- Add ForClause interface and types: BrowseForClause, ReadOnlyForClause, UpdateForClause, XmlForClause, XmlForClauseOption - Add ForClause field to QuerySpecification - Parse FOR BROWSE, FOR READ ONLY, FOR UPDATE [OF columns] clauses - Parse FOR XML with options: AUTO, EXPLICIT, RAW, PATH, ELEMENTS, XMLDATA, XMLSCHEMA, ROOT, TYPE, BINARY BASE64 - Add "FOR" to reserved keywords that shouldn't be parsed as table aliases - Add JSON marshaling for all FOR clause types Enables BaselinesCommon_ForClauseTests and ForClauseTests tests.
- Update CreateExternalTableStatement AST with ColumnDefinitions and ExternalTableOptions fields - Add ExternalTableColumnDefinition type with ColumnDefinition and NullableConstraint - Add ExternalTableLiteralOrIdentifierOption type for table options - Parse column definitions with data types, collation, and NULL/NOT NULL - Parse WITH clause options: DATA_SOURCE, LOCATION, FILE_FORMAT, TABLE_OPTIONS - Handle national string literals (N'...') properly in option values - Add Collation field to ColumnDefinitionBase - Add JSON marshaling for new types Enables multiple CREATE EXTERNAL TABLE tests: - Baselines160_CreateExternalTableStatementTests160 - CreateExternalTableStatementTests160 - CreateExternalTableStatementTestsFabricDW - BaselinesFabricDW_CreateExternalTableStatementTestsFabricDW
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.