Skip to content

test CI #1

Open
XL-Zhao-23 wants to merge 8 commits intomasterfrom
feature/issue-124-basic-ddl
Open

test CI #1
XL-Zhao-23 wants to merge 8 commits intomasterfrom
feature/issue-124-basic-ddl

Conversation

@XL-Zhao-23
Copy link
Owner

No description provided.

@XL-Zhao-23 XL-Zhao-23 force-pushed the feature/issue-124-basic-ddl branch 12 times, most recently from b99d7fe to aa4cdb5 Compare January 17, 2026 07:59
@XL-Zhao-23 XL-Zhao-23 force-pushed the feature/issue-124-basic-ddl branch 2 times, most recently from 38cc46d to 8b22cb3 Compare February 3, 2026 11:00
@XL-Zhao-23 XL-Zhao-23 marked this pull request as ready for review February 3, 2026 11:11
XL-Zhao-23 and others added 7 commits February 3, 2026 19:14
Implement bound types using project-standard LabelSet and NodeTypeRef:
- BoundVertexType: vertex type with key, labels (LabelSet), and properties
- BoundEdgeType: edge type with direction, labels, and node references
- NodeTypeRef: enum for Alias/Filler/Empty node type references
- NodeOrEdgeTypeFiller: inline type definition support

Add binder to convert AST to bound types:
- bind_graph_element_type(): entry point for binding
- bind_node_type() and bind_edge_type(): specific binding logic
- string_to_label_id(): hash-based LabelId generation
- bind_node_type_ref(): handle node type reference binding
- Support for all value types (numeric, string, temporal, vector)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add plan nodes for DDL catalog operations:
- CreateGraph: plan node with graph name, type, and CreateKind
- DropGraph: plan node with graph name and if_exists flag
- CreateKind enum: Create/CreateIfNotExists/CreateOrReplace
- BoundGraphType: Nested variant for graph type definitions

Update PlanNode enum with PhysicalCreateGraph and PhysicalDropGraph variants.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add logical planning for CREATE/DROP GRAPH statements:
- bind_create_graph(): bind CREATE GRAPH with graph type
- bind_drop_graph(): bind DROP GRAPH with if_exists flag
- plan_create_graph(): create CreateGraph plan node
- plan_drop_graph(): create DropGraph plan node

Integrate with existing binder and planner infrastructure.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add optimizer support for catalog modification operations:
- Handle CreateGraph plan nodes (pass-through to physical)
- Handle DropGraph plan nodes (pass-through to physical)

DDL operations don't require complex optimization, so they directly
convert from logical to physical plans.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement full executor support for DDL operations:

CreateGraphBuilder:
- Handles Create/CreateIfNotExists/CreateOrReplace semantics
- Creates MemoryGraphTypeCatalog from BoundGraphElementType
- Registers labels and builds label registry (LabelId → String)
- Resolves NodeTypeRef (Alias/Filler/Empty) to VertexTypeRef
- Creates MemoryVertexTypeCatalog and MemoryEdgeTypeCatalog
- Adds graph to schema catalog with GraphStorage

DropGraphBuilder:
- Handles if_exists flag
- Removes graph from schema catalog

Key implementation details:
- Two-pass label registration to handle forward references
- Label registry to map LabelId back to strings for catalog
- resolve_vertex_type_from_node_ref() for flexible node type resolution
- get_or_create_vertex_type_by_name() for alias resolution
- Full compatibility with minigu_catalog LabelSet and provider traits

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add end-to-end test for CREATE GRAPH and DROP GRAPH:

Test case (create_drop_graph.gql):
- CREATE GRAPH with vertex types (Person, City)
- CREATE GRAPH with edge type (Person)-[:LIVES_IN]->(City)
- DROP GRAPH to clean up

Test verifies:
- Complete DDL flow from parsing to execution
- Graph type catalog creation with LabelSet
- Vertex and edge type registration
- NodeTypeRef resolution (Alias references)
- Proper catalog cleanup with DROP GRAPH

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@XL-Zhao-23 XL-Zhao-23 force-pushed the feature/issue-124-basic-ddl branch from 8b22cb3 to 0794e50 Compare February 3, 2026 11:21
@XL-Zhao-23 XL-Zhao-23 force-pushed the feature/issue-124-basic-ddl branch from 0794e50 to 4e693f8 Compare February 3, 2026 11:23
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.

1 participant