Skip to main content
ToraDB attaches a type manifest per table (column_types in manifest.json) so WHERE, IN, and BETWEEN compare values numerically or chronologically instead of lexically. When types are declared, new Parquet segments use a hybrid native layout: typed Arrow columns for declared fields plus metadata_json for any other keys.

Declare types at create time

Python:
Supported type names: text, int, float, bool, date, timestamp, json, uuid, vector (with optional dimension, e.g. vector(384) or vector[384]). Vector dimensions are stored in manifest.json as vector:384 (bare vector when no dimension is given).

Fix legacy tables

REWRITE updates the manifest and runs COMPACT TABLE … FULL so existing segments are rewritten to the native hybrid layout. Without REWRITE, the manifest updates immediately but legacy segments stay on disk until you compact:
Types are persisted in the table manifest.json sidecar (column_types).

Compound filters

Combine predicates with AND / OR and parentheses:

Filter behavior

Typed filters apply to:
  • Analytics SELECT with GROUP BY / aggregates
  • Retrieval SELECT with SPARSE SEARCH / VECTOR SEARCH and a WHERE clause (post-filter on candidates)

Introspection

Both include declared column_types when present.

On-disk layout (native hybrid)

Segment columns (when column_types is non-empty, schema_version ≥ 4): Legacy segments (four columns only) remain readable. Migrate them with:
After compact, declared fields are stored natively; filters and scans use the same SQL as before.