Crate llkv_table

Crate llkv_table 

Source
Expand description

Table abstraction and system catalog for LLKV.

This crate provides the Table type, which builds on [llkv-column-map]’s columnar storage to offer a higher-level, schema-aware interface. It includes:

  • Table: Schema-aware table abstraction with append, scan, and schema operations
  • SysCatalog: System catalog (table 0) that stores table and column metadata
  • TableMeta and ColMeta: Metadata structures for tables and columns
  • Schema management: Arrow schema integration with field ID tracking
  • Scan operations: Projection, filtering, ordering, and computed columns
  • MVCC integration: Automatic handling of created_by and deleted_by columns

§Architecture

Tables use ColumnStore for physical storage but add:

  • Schema validation and enforcement
  • Field ID assignment and tracking
  • System catalog for metadata persistence
  • MVCC column management
  • Row ID filtering (for transaction visibility)

§Table IDs

  • Table 0: Reserved for the system catalog (stores TableMeta and ColMeta)
  • Tables 1+: User tables

See CATALOG_TABLE_ID and is_reserved_table_id.

§System Catalog

The SysCatalog stores table metadata in table 0, which is a reserved system table.

Re-exports§

pub use reserved::CATALOG_TABLE_ID;
pub use table::Table;

Modules§

catalog
Centralized table catalog for table and field name resolution.
constants
expr
reserved
Reserved value ranges for system use.
schema_ext
Schema extensions for efficient field ID caching.
table
types
Common types for the table core.

Structs§

ColMeta
Metadata about a column.
PlanAnnotations
Aggregate annotations that apply to the whole plan.
PlanEdge
Edge between two planner nodes.
PlanEdgeMetadata
Metadata associated with plan edges or inputs.
PlanExpression
Expression or projection annotations associated with a node.
PlanField
Column description carried with each node’s output schema.
PlanGraph
Immutable DAG describing the planner output.
PlanGraphBuilder
Builder for PlanGraph that enforces DAG invariants while allowing incremental construction.
PlanGraphVersion
Semantic version identifier for the plan graph payload.
PlanInput
Incoming connection for a node.
PlanNode
Planner node with annotations used to describe how operators compose.
PlanNodeId
Unique identifier for a planner node.
SysCatalog
Interface to the system catalog (table 0).
TableMeta
Metadata about a table.

Enums§

PlanGraphError
Errors raised while constructing or validating a plan graph.
PlanOperator
Planner node operator kind.

Constants§

PLAN_GRAPH_VERSION
Current version of the planner IR.

Type Aliases§

FieldId
Unique identifier for a column within a table.
PlanGraphResult
RowId
Unique identifier for a row within a table.