VelesQL Parser-Executor Conformance Matrix

August 22, 2026 ยท View on GitHub

This document lists every VelesQL feature with its parser and executor status. A feature can be Parsed (the grammar + AST accept it) without being Executed (the query engine acts on it at runtime).

Last updated: 2026-08-22 (VelesDB v5.2.0)

Fully Supported (Parsed AND Executed)

FeatureParser sourceExecutor sourceNotes
SELECT * / named columnsgrammar.pest:select_listquery_engine.rsFull support
SELECT DISTINCTgrammar.pest:distinct_modifierquery_engine.rsEPIC-052 US-001
FROM <collection>grammar.pest:from_clausequery_engine.rsSingle collection
FROM <collection> AS <alias>grammar.pest:from_clausequery_engine.rsBUG-8 fix
WHERE <condition>grammar.pest:where_clausesearch/query/Equality, comparison, logical
WHERE vector NEAR $vgrammar.pest:vector_searchsearch/query/planner.rskNN via HNSW
WHERE vector SPARSE_NEAR $svgrammar.pest:sparse_vector_searchsearch/query/hybrid_sparse.rsSPLADE/BM42
WHERE content MATCH 'term'grammar.pest:match_exprsearch/query/planner.rsBM25 full-text
ORDER BY field [ASC|DESC]ast/select.rs:SelectOrderByquery_engine.rsField + similarity()
ORDER BY similarity()ast/select.rs:SimilarityOrderByquery_engine.rsEPIC-051
LIMIT ngrammar.pest:limit_clausequery_engine.rs
OFFSET ngrammar.pest:offset_clausequery_engine.rs
INNER JOINast/join.rs:JoinType::Innersearch/query/join.rsEPIC-031 US-004
LEFT JOINast/join.rs:JoinType::Leftsearch/query/join.rs:192-226EPIC-031 US-004
RIGHT JOINast/join.rs:JoinType::Rightsearch/query/join.rsEPIC-031 US-004
FULL JOINast/join.rs:JoinType::Fullsearch/query/join.rsEPIC-031 US-004
GROUP BYast/aggregation.rs:GroupByClausevelesql/aggregator.rs
HAVINGast/aggregation.rs:HavingClausevelesql/aggregator.rs
Aggregate functionsast/aggregation.rsvelesql/aggregator.rsCOUNT, SUM, AVG, MIN, MAX
USING FUSION(strategy=...)ast/fusion.rs:FusionClausesearch/query/sparse_dispatch.rs:resolve_fusion_strategy + hybrid_sparse.rsHonored: RRF, RSF, average, maximum, weighted (RSF/weighted use dense_weight/sparse_weight)
WHERE vector NEAR_FUSED [...]grammar.pest:vector_fused_searchsearch/query/fused_dispatch.rsExecutable multi-vector fusion via multi_query_search; honors rrf/average/maximum (others fall back to RRF). Must be the only vector predicate, AND-able with a metadata filter only
ALTER COLLECTION ... SET (auto_reindex=...)ast/ddl.rsdatabase/ddl_executor.rs:execute_alter_collectionApplies and persists the auto-reindex policy (restored on next open)
WITH (key=value) hintsast/with_clause.rs:WithClausequery_engine.rsef_search, mode, quantization
TRAIN QUANTIZER ON <coll>ast/train.rsdatabase/training.rsPQ training
MATCH (a)-[r]->(b)ast/mod.rs:MatchClausesearch/query/match_exec.rsGraph traversal
similarity() functiongrammar.pest:similarity_exprsearch/query/In WHERE + ORDER BY
IN (list)grammar.pest:in_exprsearch/query/where_eval.rsValue list matching
BETWEEN x AND ygrammar.pest:between_exprsearch/query/where_eval.rsRange filtering
LIKE / ILIKEgrammar.pest:like_exprsearch/query/where_eval.rsPattern matching
IS NULL / IS NOT NULLgrammar.pest:is_null_exprsearch/query/where_eval.rsNull checks
NOW()grammar.pest:temporal_exprsearch/query/where_eval.rsEPIC-038; current Unix timestamp
INTERVAL arithmeticast/values.rs:IntervalValuesearch/query/where_eval.rsEPIC-038; seconds, minutes, hours, days, weeks, months
INSERT INTOast/dml.rs:InsertStatementdatabase/query_engine.rsDML
UPDATE ... SETast/dml.rs:UpdateStatementdatabase/query_engine.rsDML
DELETE FROMast/dml.rs:DeleteStatementdatabase/query_engine.rsDML
UNION / UNION ALLgrammar.pest:set_operator, ast/mod.rs:CompoundQuerysearch/query/set_operations.rs, database/query_engine.rsEPIC-040 US-006; dedup by point ID (UNION) or keep all (UNION ALL)
INTERSECTgrammar.pest:set_operator, ast/mod.rs:SetOperator::Intersectsearch/query/set_operations.rs, database/query_engine.rsEPIC-040 US-006; keep only common point IDs
EXCEPTgrammar.pest:set_operator, ast/mod.rs:SetOperator::Exceptsearch/query/set_operations.rs, database/query_engine.rsEPIC-040 US-006; remove right-side IDs from left
CREATE COLLECTIONgrammar.pest:create_collection_stmt, ast/ddl.rs:CreateCollectionStatementdatabase/query_engine.rsDDL v3.3; vector, graph, metadata collections
DROP COLLECTIONgrammar.pest:drop_collection_stmt, ast/ddl.rs:DropCollectionStatementdatabase/query_engine.rsDDL v3.3; with IF EXISTS support
INSERT EDGEgrammar.pest:insert_edge_stmt, ast/dml.rs:InsertEdgeStatementdatabase/query_engine.rsGraph mutation v3.3
DELETE EDGEgrammar.pest:delete_edge_stmt, ast/dml.rs:DeleteEdgeStatementdatabase/query_engine.rsGraph mutation v3.3
Window functions (ROW_NUMBER(), RANK(), DENSE_RANK()) with OVER ([PARTITION BY ...] [ORDER BY ...])grammar.pest:window_item, grammar.pest:over_clausevelesql/window_evaluator.rsVelesDB v1.13.0 (PR #629); evaluated after DISTINCT, before ORDER BY/LIMIT

Parsed but NOT Executed

These features have grammar rules and AST representations but no runtime execution path. Queries using them will parse successfully but produce incorrect or empty results at execution time.

FeatureParser sourceStatusNotes
Correlated subqueriesgrammar.pest:subquery_expr, ast/values.rs:SubqueryParsed, then rejected at validation with V010 (SubqueryNotExecutable). Non-correlated scalar subqueries (e.g. WHERE price > (SELECT AVG(price) FROM products)) are executed: they are evaluated and substituted as literals before validation runs (velesql/validation.rs:reject_subqueries)EPIC-039
MATCH ORDER BY aggregate (no GROUP BY) or bare aliasmatch_exec/order_by.rsParsed, then rejected at execution with VELES-018 (GraphNotSupported). Supported MATCH ORDER BY: similarity(), similarity(field, $v), depth, alias.property, arithmetic over a bare property identifier (e.g. year - 2000)EPIC-045
MATCH ORDER BY in the WASM/browser executorvelesdb-wasm/src/velesql_match_orderby.rsReduced subset of the row above: only depth and alias.property are honored. similarity(), similarity(field, $v), arithmetic, and aggregate forms are rejected with an error because the browser MATCH path materializes no vector scoresCore supports the full set; this is a documented WASM-only divergence

Not Parsed (Not in Grammar)

These SQL features are not in the VelesQL grammar and will produce parse errors.

FeatureNotes
MATCH ORDER BY arithmetic over a dotted path (e.g. d.year - 2000)Parse error; only arithmetic over a bare property identifier (e.g. year - 2000) is accepted
CTEs (WITH name AS (SELECT ...))VelesQL WITH is for query hints, not CTEs
Subqueries in FROM clauseOnly collection names allowed in FROM
CASE WHEN ... THEN ... ENDNot in grammar
EXISTS / IN (subquery)Not in grammar
CREATE TABLE / DDL (SQL-standard)VelesQL uses CREATE COLLECTION instead (v3.3); SQL CREATE TABLE is not supported
Stored procedures / functionsNot applicable

Conformance Test Coverage

  • Parser conformance cases: 134 cases in conformance/velesql_parser_cases.json
  • Cross-crate tests: velesql_parser_conformance integration test runs in each crate
  • Join tests: search/query/join_tests.rs (374-435)
  • Set operation parse tests: velesql/set_operations_tests.rs
  • Set operation execution tests: collection/set_operations_execution_tests.rs, search/query/set_operations.rs (unit tests)
  • Aggregation tests: velesql/aggregation_tests.rs
  • DML tests: velesql/dml_tests.rs
  • MATCH tests: search/query/match_exec_tests.rs
  • DDL parse tests: velesql/ast_tests.rs (CREATE/DROP COLLECTION)
  • DDL validation tests: velesql/validation_tests.rs, velesql/validation_parity_tests.rs
  • Graph mutation tests: velesql/dml_tests.rs (INSERT EDGE, DELETE EDGE)