Skip to content

Release v0.6.1

Choose a tag to compare

@StevenBtw StevenBtw released this 01 Nov 21:36
· 461 commits to main since this release
0aa3ff4

[0.6.1] - 2026-11-01

Correctness and speed release. Backups and restores survive a crash, stored procedure bodies run as their statements do, SPARQL follows SPARQL 1.1 in OPTIONAL, MINUS, BIND and FILTER EXISTS, GQL quantified patterns repeat as ISO GQL defines them, the query timeout stops every query, and dates, times, bytes and NaN keep their type through every binding. Plus a CSV and an RDF file loader, schema() with value types, and faster SPARQL lookups, Cypher multi-hop patterns, degree counts and bulk updates by key.

Changed

Queries and calls that ran in 0.6.0 and now fail or return another type (each fix is under Fixed). Results that change because a wrong answer was fixed are under Fixed only; every one in the differential test corpus is listed, with its reason, in scripts/difftest/reviewed/0.6.1.txt.

  • Casts: CAST of text that is no number fails with 22018, to a DECIMAL(p, s) that is too small with 22003, and a float outside the integer range, an infinity or NaN to an integer with 22003; they gave null, the largest integer or 0. toInteger and toFloat of text that is no number still give null.
  • GQL patterns: a quantified pattern of more than one edge without an upper bound or over 16 repetitions fails, an unbounded walk around a cycle fails at the path budget instead of stopping at 100 hops, and {3,1}, *3..1 or a quantifier both inside and after an edge's brackets is a syntax error.
  • SPARQL: an undeclared prefix other than rdf, rdfs, xsd, owl and fn, a variable or quoted triple in INSERT DATA or DELETE DATA, and BIND to a variable in scope are syntax errors; N-Triples, INSERT DATA and batch_insert_rdf refuse a literal subject or a predicate that is not an IRI.
  • Indexes: CREATE INDEX with a name another index has fails (IF NOT EXISTS keeps the existing one). A file with a named vector index cannot be opened by 0.6.0.
  • Transactions: SERIALIZABLE is refused with GRAFEO-Q004 (it ran as snapshot isolation); START TRANSACTION, COMMIT and ROLLBACK through a transaction object's execute fail with 25000; in C#, Rollback() after a commit throws.
  • Files and backups: a file already open fails with GRAFEO-S004 (08000) and a restore without its manifest, cursor or full backup with GRAFEO-V001; an incremental backup into another directory, a snapshot whose catalog does not apply and a parameter nested over 128 levels are refused; hybrid_search without an index it can read fails.
  • Calls and config: a procedure call with an unknown map key or an extra positional argument fails naming the parameters; TierOverride::ForceDisk for a section that cannot move to disk is refused by Config::validate.
  • Bindings: Python node["k"] and node.get("k") return native values. In Go, C# and Dart a DATE, TIME, DURATION or ZONED DATETIME result is a typed value, and in Node.js its tag object ({ $time: '12:30:00+02:00' }); they were strings or maps. A C# DateTimeOffset parameter is a ZONED DATETIME and a Go time.Duration a DURATION.

WASM: faster (and larger)

  • Built for speed: queries run about 1.6 times and inserts about 4.8 times as fast as in 0.6.0; @grafeo-db/wasm-lite grows from about 940 KB to 1.1 MB gzipped and @grafeo-db/wasm from 1.6 to 1.7 MB.
  • The full package uses the lightweight regex engine, as lite does, about 260 KB smaller; =~ and SPARQL REGEX run about as fast as in 0.6.0.

Added

  • schema() describes the data's shape: each label and edge type with its properties and their value types, and each edge type with the labels it connects, in Rust and every binding.
  • A native CSV loader: load_nodes_csv and load_edges_csv (Python, Rust, sessions) and the grafeo.load_nodes_csv and grafeo.load_edges_csv procedures load a typed CSV file in one transaction, checking its keys, about 2.7 times as fast as batch inserts. Experimental.
  • Loading RDF files and text: load_rdf(path) and load_rdf_text(text, format) in Python and Rust load Turtle or N-Triples into the default or a named graph as one bulk write, about three times as fast as a batch insert in 0.6.0.
  • Query timeouts in Python and Node.js: query_timeout and execute(..., timeout=) in Python, queryTimeout in Node.js.
  • Errors say what to do in every binding: Python raises GrafeoLockedError for a database open elsewhere, Node.js errors carry errorCode, gqlStatus and isRetryable, WASM errors their GQLSTATUS, and a Node.js Transaction rolls back when disposed.
  • SQL/PGQ graph patterns are GQL's: label expressions, an element's own WHERE, quantifiers, ANY SHORTEST and ALL SHORTEST, path modes and path variables with PATH_LENGTH, NODES and EDGES inside GRAPH_TABLE. A shortest path over more than one edge pattern is not supported yet.
  • SPARQL looks triples up from bound terms: a pattern, an OPTIONAL, an alternative path or a UNION on a bound subject or object finds its triples through the indexes, a group starts at its most selective pattern, and a property path from bound terms searches from them. LDBC IS1 on RDF runs about 7 times and IS4 about 24 times as fast, IC13 in under a millisecond (it took 6 s), and ?s (v:KNOWS|^v:KNOWS) ?f from a bound ?s in about 0.04 ms (it took 80 ms).
  • SPARQL keeps its statistics across small writes: a query after a write or a load no longer reads the whole store (an INSERT DATA and a query: 1.4 ms, was 178 ms), and the RDF store's indexes are keyed by term ids, for 27 to 31% less memory (#659).
  • Faster queries: multi-hop patterns stream (LIMIT 10 over two hops in under a millisecond and no memory, was 0.4 s and 440 MB), Cypher patterns over several relationships are 2 to 4 times as fast, degree counts read the adjacency (about 3.5 times as fast grouped, 2 to 2.8 times without grouping), property reads, filters and grouping 1.1 to 1.3 times, and a shortest path between two nodes stops sooner (LDBC IC13 about 0.25 ms per pair, was 6.3).

Deriva

Changes for Deriva, which keeps its graph in an embedded Grafeo database through the Python binding.

  • Bulk updates and reads: update_nodes(labels, rows, key="id") updates existing nodes by key in one call (about 6 ms for 1,500 rows, where the same query took 500 ms; through an index on the key, 0.25 ms for 40 rows), and get_properties_batch(ids, keys) reads several properties of many nodes, also in Rust.
  • grafeo[arrow]: the extra that installs pyarrow for nodes_to_arrow(), edges_to_arrow() and to_arrow().
  • Updates and merges by key without an index join once: UNWIND $rows AS r MATCH (n:Method {id: r.id}) SET ... is about 60 times as fast, and MERGE (with upsert_nodes) of 1,500 rows takes about 20 ms (it took 5 s).
  • Faster label queries: grouping by labels(n) about 27 times as fast, count(*) of a label from the store's count, an OR of labels reads only those labels (about 2.5 times), an edge check of one type stops at the first edge (about 200 times on busy nodes), an index lookup looks past label checks (about 45 times), and a lookup by an indexed key on two labels checks both in the lookup.
  • EXISTS runs once over the rows it checks, also inside OR and NOT (about 3 times as fast), and an OPTIONAL MATCH from bound nodes reads only their edges (LDBC IC13 under a millisecond, where it took over 30 s).
  • Whole nodes from Python queries cost less: about 1.4 times get_nodes_by_label, was 1.8 times.

Fixed

Every query result in the differential test corpus that differs from 0.6.0 is listed, with its reason, in scripts/difftest/reviewed/0.6.1.txt.

  • Backups and restores survive a crash (#667, #677): a restore is on disk before it returns, so commits after it no longer replay onto the old data, and a failed one can be retried; a backup is durable before the log it covers is let go; backups run one at a time; an incremental backup with nothing new succeeds, and a broken chain fails with the new GRAFEO-S005.
  • A restore replaces the catalog, and a restore that fails changes nothing.
  • Transactions (#670): a failed commit ends the transaction in every binding; rolled-back writes no longer block others; a direct call that fails partway leaves nothing; checkpoints and copies keep raw store writes; time travel never sees a commit in progress, and inside a transaction checks the retained history.
  • A write above a join reads the data as the statement started (#677), so it no longer changes a row twice or matches what it just created.
  • Vector and text indexes, searches and edge-list imports follow the selected graph (#677).
  • Migrating a 0.5.x file keeps its indexes, and compares the new file with the old database before replacing anything.
  • No more aborts: PROFILE of a count over a multi-hop pattern and of a SPARQL DELETE WHERE without variables, a SPARQL syntax error that looped until memory ran out, a parameter nested over 128 levels, thousands of conditions on a path or Gremlin branches (#668), a two-hop pattern through a node with over 65,536 paths, and values that wrapped around (the largest id, a WAL record over 4 GiB, an RDF ring over 2^32 terms).
  • GQL quantified patterns (#678): a WHERE inside holds for each step, a segment of several edges repeats within its bounds, an unbounded walk is no longer cut at 100 hops, {,2} starts at 0, and (n:%) matches only labeled nodes.
  • OPTIONAL MATCH and EXISTS: an OPTIONAL MATCH keeps its rows when its WHERE holds a subquery, and an EXISTS with a condition no longer runs over nodes the query never asked about.
  • Procedures (#678): OPTIONAL CALL keeps the row with nulls; a stored procedure returns as many values as it declares, and a YIELD in another order picks by name; procedure columns follow the arguments; a body runs with the schema and constraint checks of its statements, USE GRAPH with its grant checks, and a limit of 16 nested calls.
  • Expressions: aggregates inside other expressions and LET variables inside lists, maps and CASE (#539), several LET definitions in order, negative list slices, IS TYPED LIST<NODE>, size() and toList() of a vector (#585), all_different and same by value, Infinity in text, a float % by zero is NaN, and Cypher sum() of no values is 0.
  • Numbers: toInteger(' 42 ') is 42 and toInteger('4.2') 4, a float to an integer no longer wraps around, and decimal sum and avg no longer depend on the order of the rows, nor do products and remainders that fit fail (#669).
  • Ordering and grouping: a TIMESTAMP and a ZONED DATETIME of one instant order and group together in GQL and SQL/PGQ, GROUP BY without ORDER BY gives its groups in first-row order on every run and every database, also when they spill, and aggregates over a chain of edges read the variable they name.
  • Syntax: GQL // comments, non-reserved words and double-quoted names as names, a later INSERT creating its new nodes, doubled backticks in Cypher names (#579), and compound types in Cypher DDL (#678).
  • Cypher and Gremlin: shortestPath from a node to itself is no path, a variable-length relationship whose upper bound is below its lower bound (*3..1) matches nothing, as in openCypher, undirected variable-length counts no longer fail on the path budget, and Gremlin coalesce() and optional() choose a branch per traverser (#668).
  • SQL/PGQ: NODES(p) and EDGES(p) return nodes and edges (#678), ORDER BY an outer alias, parameters named after keywords, and LIMIT $n and OFFSET $n, with errors that name their clause.
  • A subquery that returns an edge in one part and a node in another returns each as what it is.
  • The query timeout stops every query, also sorts, aggregates, joins and large UNWINDs; range() near the largest integer stops at its end.
  • Vector search: the most similar rows above a threshold come first, a similarity filter gives the same rows with and without the index, embeddings written as lists are indexed (#587), and typed arrays are vectors in Node.js and WASM (#586).
  • Indexes (#678): a name stands for one index, vector indexes keep their name, a text index drops as itself, names with a colon no longer collide, a multi-property index drops whole, CREATE VECTOR INDEX takes IF NOT EXISTS, and SHOW INDEXES and list_indexes() also list the indexes made through the API.
  • Graph types: a node type takes every occurrence's properties, a graph typed by another schema's type is checked against it, DROP GRAPH forgets its type, LIKE an untyped graph is the open type, and SHOW NODE TYPES writes DDL.
  • Introspection: schema() and db.labels() list only what is in use, stored procedure errors say "Procedure", and EXPLAIN and PROFILE show the whole plan as it runs, with each operator's numbers on its own line, also with subqueries and index pushdowns.
  • SPARQL 1.1 (#701, #702, #703): a FILTER inside OPTIONAL reads the whole solution, a group that opens with OPTIONAL or MINUS starts from one empty solution, FILTER EXISTS and NOT EXISTS only filter, BIND to a variable in scope is refused, an unbound variable joins with what follows, and GRAPH ?g over a pattern without ?g gives a row per named graph.
  • SPARQL DELETE WHERE deletes only what a match of its whole pattern holds: without a match it no longer deletes its triples without variables, and every triple of a match goes, not only the first.
  • SPARQL syntax: the standard prefixes are predefined, [] is a blank node, VALUES after the query and ORDER BY a function call parse, EXPLAIN, EXPLAIN ANALYZE and PROFILE work after the prologue, IRIs with \u escapes match, alternative paths with an inverse branch run, xsd:float stays a float, and LOAD says it is not supported. N-Triples and Turtle read a dot right after a blank node or language tag and \u, \U, \b and \f escapes.
  • Durations with a negative fraction of a second: DURATION 'PT-1.5S' is minus one and a half seconds (it read as -0.5 s), and a duration of mixed signs is written P1MT-1.5S (it was P1MT-1.-5S) and reads back in every binding; a duration part past 64 bits or a signed time offset (12:00+-1:00) is refused instead of wrapping around.
  • Dates, times and durations keep their GQL type both ways in Go, C#, Dart and Node.js: Go time.Time and the new grafeo.Date, Time and Duration; C# microseconds, DateOnly, TimeOnly, DateTimeOffset, and the new GrafeoTime and GrafeoDuration; Dart's new GrafeoDate, GrafeoTime, GrafeoDuration and GrafeoZonedDateTime; Node.js the tag objects.
  • Bytes, NaN and infinities travel as $bytes and $float tags in the C, Go, C# and Dart bindings and arrive as native values; Go decodes tags in nodes, edges, streams and AsOf reads, and its streams give numbers as json.Number.
  • Parquet: LOAD DATA FORMAT PARQUET reads DATE, TIMESTAMP, TIME and DECIMAL columns as their types, the Python wheel loads Parquet (uncompressed or Snappy), and another codec is named in the error.
  • Bindings: Node.js ES module imports name every export, Go frees finished transactions, Dart rollback() after a failed commit does nothing, and WASM has detachDeleteNode (#678).
  • Data: decimal weights in graph algorithms (#678) and CSV imports with quoted line breaks (#678).
  • Smaller fixes: a write conflict says so once; a procedure argument that fails keeps its GQLSTATUS; a damaged incremental backup is GRAFEO-S002; PreparedCommit::commit returns its own epoch; CDC events of named-graph triples name the graph; list_graphs is sorted; a JSON parameter with a tag beside other keys is a map; builds with triple-store alone compile.
  • Docs: SPARQL reads in a transaction are not yet snapshot isolated (#718, planned for 0.6.2).

Deprecated

  • GrafeoDB::store(): its writes skip the write-ahead log, transactions and change capture. Write through a session or the direct API, and read through snapshot().
  • The async-storage feature, with GrafeoDB::async_wal_checkpoint and async_write_snapshot, which only wrapped a blocking call: call wal_checkpoint() from tokio::task::spawn_blocking. From 0.7.0 the enterprise profile is metrics and tracing.
  • Config::with_threads, with_query_logging, with_schema_constraints, without_schema_constraints and their getters, which never had an effect.
  • RdfStore::copy_graph: use SPARQL COPY in a session, which is logged.
  • CatalogError::InvalidCheck: nothing returns it; CHECK constraints come back later as DDL.

All are removed in 0.7.0.

Contributors

  • Thanks to teipsum for reporting the SPARQL OPTIONAL, MINUS and BIND bugs (#701, #702, #703), each with its measurements and the section of the spec.
  • Thanks to temporaryfix for decimal weights in the graph algorithms (#681), the test of a failed RDF commit (#683), the refusal of an incremental backup with a gap (#684), crash-safe backups (#685) and restores (#687, #689), backups that run one at a time (#690), time-travel reads that never see a commit in progress (#686), claims released after a rollback (#693) and time travel inside a transaction that checks retained history (#695), CSV fields with line breaks (#692), aggregates inside other expressions (#682), OPTIONAL MATCH patterns that read the rows before them (#698), OPTIONAL CALL of a procedure (#699), stored procedure results that fit their columns (#700), index lists with the indexes made through the API (#704), decimal products and remainders that fit (#691), test fixtures that build with any feature set (#694), direct calls that leave nothing when they fail, with raw store writes that checkpoints keep (#696), SQL/PGQ path nodes and edges (#705), compound types in Cypher type DDL (#706), and detachDeleteNode in WASM (#708).

What's Changed

Full Changelog: v0.6.0...v0.6.1