Skip to content

Fix table variable warnings on modification operators#80

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/table-variable-warnings
Mar 10, 2026
Merged

Fix table variable warnings on modification operators#80
erikdarlingdata merged 1 commit intodevfrom
fix/table-variable-warnings

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Node-level Rule 22: Insert/Update/Delete on table variables now shows Critical "forces serial" warning instead of generic "lacks statistics"
  • Statement-level Rule 22: stats warning only fires when reading from a table variable, not modifying it
  • Parameters pane: table variable names (e.g., @t) excluded from local variable detection

Test plan

  • Open table-variable-red-flags.sqlplan — INSERT node shows Critical warning about forced serialization
  • SELECT statement still shows stats warning on table variable scan nodes
  • Parameters pane no longer shows false "Local variables detected (@t)"
  • 48 tests pass

🤖 Generated with Claude Code

- Node-level: Insert/Update/Delete on table variables now shows Critical
  "forces serial" warning instead of generic "lacks statistics" message
- Statement-level: stats warning only fires when reading from a table
  variable, not modifying it
- Parameters pane: exclude table variable names from local variable
  detection so @t is not misreported as an unresolved local variable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit fd53dc4 into dev Mar 10, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/table-variable-warnings branch March 10, 2026 19:07
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.

1 participant