-
Notifications
You must be signed in to change notification settings - Fork 0
Enable 22 more tests and add NULL/NOT NULL constraint support #8
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
Dec 14, 2025
- Add OptimizerHintBase interface for polymorphic optimizer hints
- Add LiteralOptimizerHint support for hints with values (e.g., LABEL = 'value')
- Implement NULL/NOT NULL constraint parsing in column definitions
- Add constraintDefinitionToJSON for serializing NullableConstraintDefinition
- Extend convertHintKind with comprehensive hint mappings
- Enable 22 additional tests:
- Optimizer hints tests (110, 130, 150 versions)
- Declare variable tests
- CREATE SCHEMA, CREATE DEFAULT, CREATE MASTER KEY tests
- IF, BEGIN/END, SELECT statement tests
- Nullable constraint tests
- Various baseline tests
- Update skipped_tests_by_size.txt
- Add OptimizerHintBase interface for polymorphic optimizer hints - Add LiteralOptimizerHint support for hints with values (e.g., LABEL = 'value') - Implement NULL/NOT NULL constraint parsing in column definitions - Add constraintDefinitionToJSON for serializing NullableConstraintDefinition - Extend convertHintKind with comprehensive hint mappings - Enable 22 additional tests: - Optimizer hints tests (110, 130, 150 versions) - Declare variable tests - CREATE SCHEMA, CREATE DEFAULT, CREATE MASTER KEY tests - IF, BEGIN/END, SELECT statement tests - Nullable constraint tests - Various baseline tests - Update skipped_tests_by_size.txt
- Add TokenNationalString for N'...' string literals - Handle N-prefixed strings in ODBC literals - Fix variable name handling in BEGIN TRANSACTION (check @ prefix first) - Add division (/) and modulo (%) operators - Add parseMultiplicativeExpression for proper operator precedence - Enable BeginTransactionStatementTests and BaselinesCommon version - Update skipped_tests_by_size.txt Total enabled tests: 50 (24 newly enabled from original baseline)
- Add MoveConversationStatement AST type and parser - Add SetStatisticsStatement for SET STATISTICS IO/PROFILE/TIME/XML - Extend PredicateSetStatement with more options (ANSI_DEFAULTS, ANSI_NULL_DFLT_OFF, ANSI_NULL_DFLT_ON, NO_BROWSETABLE, etc.) - Add MOVE and CONVERSATION keywords to lexer - Enable 4 more tests: MoveConversationStatementTests (2), PredicateSetTests (2) Total enabled tests: 28 (53 passing)
- Add GetConversationGroupStatement AST type and parser - Add GET keyword to lexer - Make ENCRYPTION BY PASSWORD optional in CREATE MASTER KEY - Enable 4 more tests: GetConversationGroupStatementTests (2), CreateMasterKeyStatementTests130 (2) Total enabled tests: 32 (57 passing)
- Add TRUNCATE TABLE with partition support - Add trivial statements (USE, KILL, CHECKPOINT, RECONFIGURE, SHUTDOWN, SETUSER, LINENO) - Add RAISERROR statement with WITH options - Add GlobalVariableExpression for @@variables - Add BooleanParenthesisExpression for parenthesized conditions - Add BooleanIsNullExpression for IS NULL/IS NOT NULL - Enable 8 new tests: TruncatePartitions120 (x2), TrivialStatementTests (x2), WhileStatementTests (x2), RaiseErrorStatementTests (x2)
- Add ScalarSubquery for (SELECT ...) in expressions - Add BooleanIsNullExpression for IS NULL/IS NOT NULL predicates - Add IS keyword to lexer
Now at 67 passing tests total (10 new tests enabled).
- Add BooleanInExpression for IN (values) and IN (subquery) - Add BooleanLikeExpression for LIKE with optional ESCAPE - Add BooleanBetweenExpression for BETWEEN x AND y - Add NOT IN, NOT LIKE, NOT BETWEEN support - Add IN, LIKE, BETWEEN, ESCAPE tokens to lexer
- Implement SEND statement for Service Broker messaging - Implement RECEIVE statement for WAITFOR (RECEIVE ...) - Update WAITFOR to support statement option with nested RECEIVE/GET CONVERSATION GROUP - Add CREATE CREDENTIAL statement support - Add COMMIT TRANSACTION WITH (DELAYED_DURABILITY) support - Enable SendStatementTests, WaitForStatementTests90, CreateCredentialStatementTests - Enable CommitTransactionStatementTests120 baseline - 75 tests now passing (was 67)
- Implement AlterMasterKeyStatement for regenerate, add/drop encryption - Support FORCE REGENERATE, ADD/DROP ENCRYPTION BY PASSWORD - Support ADD/DROP ENCRYPTION BY SERVICE MASTER KEY - 77 tests now passing (was 75)
- Implement AlterSchemaStatement for TRANSFER with optional object kinds - Support TYPE::, OBJECT::, XML SCHEMA COLLECTION:: qualifiers - Add TokenColonColon for :: handling in lexer - 79 tests now passing (was 77)
- Add AlterLoginAddDropCredentialStatement to AST - Add TokenLogin and TokenAdd to lexer - Add parseAlterLoginStatement and JSON marshaling - Enable LoginStatementTests100, MoveConversationStatementTests, RaiseErrorStatementTests, and TruncatePartitions120 tests (including their baseline versions) 87 tests now passing (was 79)
- Add ExecuteAsStatement and ExecuteContext to AST - Add TokenUser, TokenCaller, TokenNoRevert to lexer - Add parseExecuteAsStatement function - JSON marshaling for ExecuteAsStatement Note: Tests still skipped due to function call with CallTarget parsing needed for dbo.fn_getuser() case
- Add CreateProcedureStatement and ProcedureParameter to AST - Add parseCreateProcedureStatement with parameter parsing - Add parseStatementList for procedure body - Add JSON marshaling for procedure statements This enables parsing of CREATE PROC/PROCEDURE statements with parameters, WITH options, and statement body.
- VariableTests + BaselinesCommon_VariableTests - SemicolonsBeforeStatementTests1 + Baselines90_SemicolonsBeforeStatementTests1 83 tests now passing (was 79)
84 tests now passing (was 83)
- Add DropExternalLanguageStatement to AST - Add TokenExternal and TokenLanguage to lexer - Add parseDropExternalLanguageStatement and JSON marshaling Note: Tests skipped due to UTF-8 BOM at file start
- Skip UTF-8 BOM at start of input - Fix JSON field name from Authorization to Owner 86 tests now passing (was 84)
New features: - ALTER ROLE (ADD/DROP MEMBER, WITH NAME) - CREATE ROLE with AUTHORIZATION - ALTER TABLE ... ALTER INDEX with options - DROP EXTERNAL LIBRARY - IDENTITY column support in CREATE TABLE - Bracketed identifiers for data types like [int] Newly enabled tests: - IntegerTests + BaselinesCommon_IntegerTests - RoleStatementTests + RoleStatementTests110 + Baselines variants - AlterTableAlterIndex130 + Baselines130_AlterTableAlterIndex130 - DropExternalLibrary140 + Baselines140_DropExternalLibrary140
Handle comma-separated list of elements with COLUMN, CONSTRAINT, and INDEX keywords mixed with unqualified element names. Enable 2 more tests: - BaselinesCommon_AlterTableDropTableElementStatementTests - AlterTableDropTableElementStatementTests
New statement support: - ALTER SERVER CONFIGURATION SET SOFTNUMA ON/OFF - ALTER TABLE ADD INDEX with hash/nonclustered index types - ALTER TABLE ADD column with column definitions - ALTER TABLE ALTER COLUMN (change data type) - ALTER MESSAGE TYPE VALIDATION - CREATE CONTRACT with SENT BY options - CREATE PARTITION SCHEME Lexer enhancements: - Add << and >> shift operators (TokenLeftShift/TokenRightShift) Expression parsing: - Add shift expression parsing between additive and comparison Tests enabled: - AlterServerConfigurationSoftNumaTests130 (2) - AlterTableAddIndexTests (2) - AlterTableStatementTests160 (2) - ShiftOperatorTests160 (2) - AlterMessageTypeStatementTests (2) - CreateContractStatementTests (2) - CreatePartitionSchemeStatementTests (2)
…2→114) New features: - ALTER DATABASE SCOPED CREDENTIAL statement with IDENTITY and SECRET options - AlterCredentialStatement AST type
New features: - ALTER DATABASE ... SET statement with database options - ACCELERATED_DATABASE_RECOVERY option support - AlterDatabaseSetStatement and AcceleratedDatabaseRecoveryDatabaseOption AST types
- Rename BooleanBetweenExpression to BooleanTernaryExpression - Add CreateRuleStatement AST and parser - Add CreateSynonymStatement AST and parser - Fix ALTER DATABASE SET to handle options without = sign - Enable AlterDatabaseOptionsTests140_Azure (2 tests) - Enable CreateRuleStatementTests (3 tests) - Enable CreateSynonymStatementTests (2 tests) - Enable GotoStatementTests (2 tests) - already implemented
- Add TokenBinary and TokenReadtext to lexer - Add binary literal (0x...) support to lexer - Add BinaryLiteral AST type - Add ReadTextStatement AST type - Implement parseReadTextStatement with support for empty identifiers in multi-part names - Add JSON serialization for ReadTextStatement, BinaryLiteral, and ColumnReferenceExpression - Enable ReadTextStatementTests (2 tests)
- Add Nullable field to DeclareVariableElement AST - Update parseDeclareVariableElement to handle NULL/NOT NULL - Update declareVariableElementToJSON to include Nullable - Fix NullLiteral to preserve original case from source - Enable DeclareVariableElementTest (2 tests)
- Add AlterRemoteServiceBindingStatement AST - Add UserRemoteServiceBindingOption and OnOffRemoteServiceBindingOption - Add parseAlterRemoteServiceBindingStatement - Add JSON serialization - Enable AlterRemoteServiceBindingStatementTests (2 tests)
- Add ALTER/CREATE XML SCHEMA COLLECTION statement support - Add WRITETEXT statement support with BULK, WITH LOG options - Add binary literal support in expressions (TokenBinary) - Add CREATE SEARCH PROPERTY LIST statement support Enable 8 additional tests (131→139): - AlterXmlSchemaCollectionStatementTests - CreateXmlSchemaCollectionStatementTests - WriteTextStatementTests - CreateSearchPropertyListStatementTests
- Add TokenUpdatetext to lexer - Implement UpdateTextStatement AST type - Add parseUpdateTextStatement using parsePrimaryExpression for InsertOffset and DeleteLength to avoid treating - as subtraction - Support BULK, TIMESTAMP, WITH LOG options - Support SourceColumn and SourceParameter arguments - Enable UpdateTextStatementTests and BaselinesCommon_UpdateTextStatementTests Tests now at 141 passing.
- Add parseCreateDatabaseScopedCredentialStatement for CREATE DATABASE SCOPED CREDENTIAL syntax - Add CryptographicProviderName field to CreateCredentialStatement AST - Add FOR CRYPTOGRAPHIC PROVIDER clause parsing - Enable CreateDatabaseScopedCredentialStatementTests130 (2 tests) - Enable CreateCredentialStatementTests100 (2 tests) Tests now at 145 passing.
…/FEDERATION - Create AST types for all 5 DROP statements - Add parsing functions for each DROP statement type - Add JSON marshaling for each DROP statement type - Enable DropStatementsTests110 (2 tests) Tests now at 147 passing (up from 145).
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.