Skip to content

Execution model

QQL deliberately separates language correctness from backend execution.

StageInput → outputWhat can fail
Parsesource → typed Stmtsyntax, duplicate/out-of-order clauses, invalid literals
RewriteStmt → policy-safe Stmtunsupported injection target or operator
PrepareStmt + schema/embedder → prepared statementambiguous vector role, missing model, embedding failure
Planprepared statement → PlannedOperationunsupported semantic combination
Dispatchplan → REST, gRPC, or edgebackend capability, transport, Qdrant response
QQLA schema-resolved text queryTry in playground
QUERY TEXT 'release safety' FROM engineering_docs
USING semantic_v2
PARAMS (hnsw_ef = 96, exact = false)
LIMIT 12;

USING semantic_v2 names the vector. During preparation, the runtime reads the collection schema to determine whether that vector is dense, sparse, or multivector. Offline compilation can use AS DENSE, AS SPARSE, or AS MULTI when no schema is available.

Parser::parse accepts exactly one complete statement. Parser::parse_all accepts a semicolon-delimited script. Host arrays are a separate batch axis: each array element may itself be a statement or script.

The executor parses a string as a script automatically and can wire-batch compatible adjacent operations while preserving result cardinality.

The plan IR is authoritative. REST serializes it to OpenAPI routes and JSON; gRPC converts it to Qdrant protobuf types; edge evaluates the supported subset in process.