Skip to main content

Module schema

Module schema 

Source
Expand description

Arrow schemas for code graph objects.

Two tables:

  • CodeNodes: functions, classes, modules, files — the objects in the code graph
  • CodeEdges: calls, imports, inheritance, containment — relationships between objects

§V12a-1 additions (EX-3168)

V12/V13 parity audit: V12/V13 Python had no position metadata and no Rust-specific node kinds. All position columns and Rust-specific CodeNodeKind variants are new work, not ports from V12.

Position columns (13–18) are nullable — backward-compatible with existing Parquet files. New Parquet files produced by the Rust tree-sitter parser (EX-3120) will populate them.

Modules§

edge_col
Named column indices for the CodeEdges schema.
node_col
Named column indices for the CodeNodes schema.

Structs§

CodeEdge
A code edge record for batch building.
CodeNode
A code node record for batch building.

Enums§

CodeEdgePredicate
Kind of relationship between code objects.
CodeNodeKind
Kind of code object.

Constants§

CODE_EMBEDDING_DIM
Default embedding dimension for code objects.

Functions§

build_code_edges_batch
Build a RecordBatch of CodeEdges.
build_code_nodes_batch
Build a RecordBatch of CodeNodes (without embeddings — those are added later).
code_edges_schema
Schema for the CodeEdges table.
code_nodes_schema
Schema for the CodeNodes table.
extract_file_path
Extract file path from a CodeNode ID.