[SQL] Assign persistent IDs to recursive circuit inputs even if they are never used - #6794
Conversation
mythical-fred
left a comment
There was a problem hiding this comment.
APPROVE. Fix targets exactly what #6792 describes: recursive-scope outputs whose corresponding view isn't read through the delay were emitted as _ in the tuple destructure, so the trailing z^-1 never got a persistent id and checkpointing died with NoPersistentId. Renaming those slots to unused_<i> and giving the delay a stable id (hash + ".delay") is the minimal fix, and gating on operator.internalOutputs.get(i) != null keeps the _ for outputs that don't exist. The MerkleOuter log addition (compact name alongside the id) is a nice debuggability bonus.
Tests cover it well: test_mutually_recursive_views_survive_restart sets up two mutually recursive views where the compiler keeps one declaration and drops the other's — exactly the shape that used to leave the scope with an unnamed z^-1. The docstring's clarity on why checkpoint-across-restart-of-unchanged-program is the specific catchpath (materialized views, no replay source, deriving through pre-restart state) is excellent — future readers will thank you.
2b6dbb5 to
ba7214a
Compare
…are never used Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Fixes #6792