Skip to content

Add support for more DROP statements and enable 2 more tests#13

Merged
kyleconroy merged 11 commits intomainfrom
claude/fix-phase-two-tests-F2Pdt
Dec 16, 2025
Merged

Add support for more DROP statements and enable 2 more tests#13
kyleconroy merged 11 commits intomainfrom
claude/fix-phase-two-tests-F2Pdt

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

Added parsing and JSON marshaling for:

  • DROP SECURITY POLICY
  • DROP EXTERNAL DATA SOURCE
  • DROP EXTERNAL FILE FORMAT
  • DROP EXTERNAL TABLE
  • DROP EXTERNAL RESOURCE POOL
  • DROP WORKLOAD GROUP
  • DROP WORKLOAD CLASSIFIER

Fixed DROP DATABASE SCOPED detection to use lookahead
so that SCOPED can be used as a database name.

Enabled tests:

  • DropStatementsTests130
  • Baselines130_DropStatementsTests130

Added parsing and JSON marshaling for:
- DROP SECURITY POLICY
- DROP EXTERNAL DATA SOURCE
- DROP EXTERNAL FILE FORMAT
- DROP EXTERNAL TABLE
- DROP EXTERNAL RESOURCE POOL
- DROP WORKLOAD GROUP
- DROP WORKLOAD CLASSIFIER

Fixed DROP DATABASE SCOPED detection to use lookahead
so that SCOPED can be used as a database name.

Enabled tests:
- DropStatementsTests130
- Baselines130_DropStatementsTests130
New DROP statements:
- DROP TYPE
- DROP AGGREGATE
- DROP SYNONYM
- DROP USER
- DROP ROLE
- DROP ASSEMBLY

Updated DROP INDEX to support ON clause syntax:
- DROP INDEX index_name ON table_name

Added DropBehavior field to DropSchemaStatement for proper JSON output.
Enabled tests:
- CreateAggregateStatementTests
- Baselines90_CreateAggregateStatementTests

Total passing tests: 274 (up from 272)
Systematically tested all 683 skipped tests with ast.json files.
Found that these additional tests pass:
- AcceleratedDatabaseRecoveryTests150
- AlterDatabaseOptionsTests140_Azure
- AlterDatabaseScopedCredentialStatementTests130
- AlterIndexStatementTests100
- AlterMasterKeyStatementTests
- AlterMessageTypeStatementTests
- And more (see diff for full list)

Total: 280 passing tests (up from 274)
Added parsing and JSON marshaling for BACKUP CERTIFICATE statement:
- Supports basic BACKUP CERTIFICATE name TO FILE = 'path' syntax
- Supports WITH PRIVATE KEY clause with FILE, ENCRYPTION BY PASSWORD,
  and DECRYPTION BY PASSWORD options

Enabled tests:
- BackupCertificateStatementTests
- Baselines90_BackupCertificateStatementTests

Total: 282 passing tests (up from 280)
… and BoundaryValues

- Update CreatePartitionFunctionStatement AST to include ParameterType, Range, and BoundaryValues fields
- Add PartitionParameterType AST type with DataType and optional Collation
- Implement full parsing of CREATE PARTITION FUNCTION statement including:
  - Parameter type with data type and optional COLLATE clause
  - AS RANGE LEFT/RIGHT clause
  - FOR VALUES with boundary value expressions
- Add JSON marshaling for PartitionParameterType
- Enable CreatePartitionFunctionStatementTests and Baselines90_CreatePartitionFunctionStatementTests
- Parse IDENTITY and SECRET options in ALTER CREDENTIAL
- Enable AlterCreateCredentialStatementTests and Baselines90 version
- Tests now at 286 passing
- Rename SourcePartition to SourcePartitionNumber in JSON output
- Rename TargetPartition to TargetPartitionNumber in JSON output
- Enable Baselines90_AlterTableSwitchStatementTests
- Tests now at 287 passing
- Add FunctionCallExists field to SetVariableStatement
- Add CursorOption type with OptionKind for cursor options like SCROLL, DYNAMIC
- Add Options field to CursorDefinition to capture cursor options
- Update SetVariableStatement JSON marshal to include SeparatorType and FunctionCallExists
- Parse cursor options before FOR SELECT in SET @var = CURSOR syntax
- Tests remain at 287 passing
@kyleconroy kyleconroy merged commit 29e8add into main Dec 16, 2025
1 check passed
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.

2 participants