Repository navigation
fix: v2 equality gaps - #577
Merged
Merged
Conversation
…cells read the last tested value
…d for object arguments
…es equal to version 1
…es without aborting on large integers
…multi-row batches
A layer over an upstream patched shape treated every null leaf as absent,
so obj.a = null over a row without obj (or with obj = 1) never created
{obj: {a: null}} for downstream reads, and an all-null column was dropped
outright. A dotted null leaf now stays present on the rows whose parent
is not an object before the write, matching version 1's merge.
…row batches Version 1 merges a node's output onto itself as a no-op when two edges from the same node meet at a target, so nested nulls survive. The batch path gathered the parent twice as separate copies and re-applied the patch, deleting those nulls and letting a dangling node's value win over a null written on the twice-connected branch. Consecutive duplicate parents now merge once.
… in batches A rule writing res, res.k and then res again keeps only the last res in version 1, because the final write replaces the object that res.k went into. The compiled table folded the duplicate paths into one slot per path and re-inserted res.k on top. Non-collect outputs that a later non-collect output of the same rule replaces are now left out.
Version 1 merges parent outputs copy-on-write: a pass-through node shares every subtree it did not change with its input, and merging two values that share an object skips it. So a nested null written once and reached through two branches survives the join, and an input null survives a pass-through that changed nothing. The batch path rebuilt each parent's rows separately, lost that sharing and deleted those nulls. When parents share a base or leading layers and the merged parent can hold a null, the join now derives their rows from the shared prefix with the same copy-on-write merge; other joins stay columnar. Traced batch rows derive pass-through outputs from their merged input the same way.
…red rows Gathering a node's rows for each consumer, and clearing a table's unmatched rows before a pass-through, materialized the same node output more than once, so a pass-through built from one copy no longer shared objects with the copy merged at the join, and the version 1 rule that a shared object merges as a no-op could not apply. Gathered copies of a node on the same rows now share one materialization, a cleared copy reuses its source's rows, layers keep their identity when picked to a row subset, and input rows match by object identity. The final output still materializes its own copy, since cleaning it mutates in place.
…an expression entry writes an object into itself on version 2 An entry such as `a.c = obj` after `a = obj` wrote the object into itself, and merging, cloning, comparing, tracing or serialising the result then overflowed the stack. The hosted expression node now checks, before each write, whether the value reaches the object it is written into and fails the row with "cyclic value at <key>". Compiled nodes that write a possibly container value under a key an earlier entry set are routed through the same row evaluation, so every path (first call, repeated, compiled, batch, columnar, traced) reports the error for that row only.
Ignored until the version 2 JS runtime rejects cyclic results; it hangs today.
…r cyclic scripts, and load date support lazily
…lone, as version 1 merges them
Function nodes on version 2 replaced Date with a JavaScript module whose local getters, setters and string methods rebuilt every field through native calls and allocations, and whose lazy half cost about 45 us to load on the first Date use of each evaluation. The pinned constructor, Date.now, Date.parse, Math.random and the zone dependent prototype methods are now callable Rust classes built with the safe rquickjs API. They read the time value through the native getTime, compute fields and offsets with chrono-tz in Rust (fixed offset zones skip the lookup, the last instant's fields are cached per evaluation) and keep QuickJS's Date for storage and everything zone independent. The constructor is a bound function so calls and constructions are told apart exactly. The prototype methods are still installed on the first construction or parse, now in about 6 us. Results are unchanged: recorded per-zone results, version parity and the isolation spec pass as before.
ivanmiletic
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.