Milestones 6 and 7: DDL and utility statements — parse corpus at 100% - #6
Merged
Conversation
VariableSetStmt (set_rest/set_rest_more/generic_set, zone_value, transaction_mode_list), VariableResetStmt, VariableShowStmt, ConstraintsSetStmt, CheckPointStmt, DiscardStmt, CallStmt, Create/Alter/Drop Role/User/Group, AlterRoleSetStmt, CreateSchemaStmt, RoleSpec/RoleId/role_list, and the CREATE/ALTER/DROP dispatch frame. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
CreateStmt (table elements, column/table constraints, LIKE, partition specs and bounds, typed and partition-of tables), CreateTableAsStmt including AS EXECUTE, CreateSeqStmt/AlterSeqStmt, ViewStmt (recursive views via makeRecursiveViewSelect), IndexStmt, CreateMatViewStmt, RefreshMatViewStmt, and the shared definition/def_elem, CAS-bits, and key-action machinery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
AlterTableStmt over TABLE/INDEX/SEQUENCE/VIEW/MATERIALIZED VIEW/FOREIGN TABLE, the full alter_table_cmd set, partition ATTACH/DETACH commands, AlterTableMoveAllStmt, alter_generic_options, identity column options, and AlterCompositeTypeStmt (ALTER TYPE ... ATTRIBUTE). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Generic DropStmt over all object types, RemoveFuncStmt/RemoveAggrStmt/ RemoveOperStmt, DropCast/DropTransform/DropOpClass/DropOpFamily, DropOwned/ReassignOwned, DropTableSpace/DropSubscription/Dropdb/ DropUserMapping, CommentStmt, SecLabelStmt, and the shared function/aggregate/operator_with_argtypes machinery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…ENDS Unified ALTER dispatcher; RenameStmt, AlterObjectSchemaStmt, AlterOwnerStmt, AlterObjectDependsStmt, AlterOperatorStmt, AlterTypeStmt, AlterEnumStmt, AlterCollationStmt, AlterSystemStmt, AlterTblSpcStmt, AlterStatsStmt, AlterDomainStmt, CreateDomain wiring pieces, AlterDatabase[Set|RefreshColl]Stmt, AlterEventTrigStmt, AlterTSDictionary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…E ASSERTION Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…icies, CREATE ACCESS METHOD Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…earch, collations, opclasses, statistics Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…appings, IMPORT FOREIGN SCHEMA Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…ransforms, TS configurations Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…ction Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…location Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…ATION FOR in FROM Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…ESET, bare DOUBLE type name, empty routine body Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
…orpus at zero todos Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
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
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.
Implements milestones 6 (DDL part 1) and 7 (DDL part 2 + utility) from PLAN.md, driving the parse suite's todo list from 19,787 cases to zero. The gate for milestones 4–7 — 100% of the regress corpus with byte-identical trees, JSON, error messages, and cursor positions — is met; the scan and both split suites are also at zero.
Milestone 6
OF type) andPARTITION OFtablesAS EXECUTEform, with bounded backtracking for theCREATE TABLE t (…)element-list vs. CTAS column-list ambiguity (commits only atAS)alter_table_cmdset, ATTACH/DETACH PARTITION,AlterTableMoveAllStmt, identity column options,ALTER TYPE … ATTRIBUTE(composite types)makeRecursiveViewSelect), CreateSeqStmt/AlterSeqStmt, CreateMatViewStmt/RefreshMatViewStmt, CreateSchemaStmt with nested schema elementsMilestone 7
BEGIN ATOMIC), ALTER FUNCTION, triggers and event triggers, rules, policiesfunction_with_argtypesand friends)SplitWithParserandIsUtilityStmtnow have real implementations (ported frompg_query_split.c/pg_query_is_utility_stmt.c) with unit testsByte-parity details the corpus forced out
AlterTableCmd/RenameStmtcarriesbehavior: DROP_RESTRICT,RenameStmt.relationTypedefaults toOBJECT_ACCESS_METHOD,AlterPublicationStmt.actiontoAP_AddObjects(*)aggregate stores a null list element inDefineStmt.args; an emptyBEGIN ATOMICbody is[NIL], not[[]]processCASbits,SplitColQualList,makeOrderedSetArgs,preprocess_pubobj_list, …);ConstraintAttributeSpec's location is always -1 (PG'sYYLLOC_DEFAULTgives empty productions -1), soprocessCASbitserrors report no cursor positionbase_yylex-merged*_LAtokens are never identifiers (found vianulls firstinindex_elem)makeRangeVarFromAnyNameleavesinhfalse (CmakeNodesemantics), unlikemakeRangeVarTooling and docs
cmd/difftodo: debug aid printing input/want/got for a file's remaining parse todosTesting
go test ./...green; every graduated case is regression-locked (a future mismatch is a hard failure, never a new todo)go test -raceover the parser and internal packages passes🤖 Generated with Claude Code
https://claude.ai/code/session_01J19Kf5LpGUhi2vxFJjzQJE
Generated by Claude Code