Skip to content

[SQL] Assign persistent IDs to recursive circuit inputs even if they are never used - #6794

Merged
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue6792
Aug 4, 2026
Merged

[SQL] Assign persistent IDs to recursive circuit inputs even if they are never used#6794
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue6792

Conversation

@mihaibudiu

Copy link
Copy Markdown
Contributor

Fixes #6792

@mihaibudiu
mihaibudiu requested a review from ryzhyk August 3, 2026 20:17
@mihaibudiu
mihaibudiu enabled auto-merge August 3, 2026 20:18
@mihaibudiu
mihaibudiu added this pull request to the merge queue Aug 3, 2026
@ryzhyk
ryzhyk removed this pull request from the merge queue due to a manual request Aug 3, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mihaibudiu
mihaibudiu force-pushed the issue6792 branch 3 times, most recently from 2b6dbb5 to ba7214a Compare August 3, 2026 23:05
@mihaibudiu
mihaibudiu enabled auto-merge August 3, 2026 23:06
…are never used

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu
mihaibudiu added this pull request to the merge queue Aug 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 3, 2026
@mihaibudiu
mihaibudiu added this pull request to the merge queue Aug 3, 2026
Merged via the queue into feldera:main with commit d07f988 Aug 4, 2026
1 check passed
@mihaibudiu
mihaibudiu deleted the issue6792 branch August 4, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sql] The compier doesn't assign persistent ids to unused recursive variables.

3 participants