Skip to content

Cursor statement bodies do not descend into UDF/StoredProc sub-plans #491

Description

@erikdarlingdata

Noticed during the 2026-09-02 review fixes (parser-depth work, #484): #456's UDF/StoredProc descent lives in ParseStatement, but a StmtCursor's statements go down the cursor branch of ParseStatementAndChildren and never reach it — so a UDF called inside a cursor's operation plans contributes no body statements to analysis. Feature gap from #456's scope, not a recursion risk (the depth guard now carries through both branches).

Cheap to check with a cursor-over-UDF fixture; the fix is routing the cursor branch's statements through the same descent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions