Add yamsql integration coverage for transaction-scoped local variables - #4568
Draft
arnaud-lacurie wants to merge 1 commit into
Draft
Conversation
Add local-variables.yamsql exercising SET TRANSACTION VARIABLE / GET_VARIABLE end-to-end through the real SQL planner/executor path: basic round trips, overwriting and retyping a variable within one transaction, the NULL-vs-never-set distinction, UNDEFINED_PARAMETER on an unset reference, use as a table-valued function argument, and coexistence with CREATE TEMPORARY FUNCTION. The inline `setup:`/`setupReference:` transaction-setup mechanism previously only allowed CREATE TEMPORARY FUNCTION statements; extend the allow-list to also accept SET TRANSACTION VARIABLE, since it has the same transaction-local, never-committed safety property that motivated the original restriction. This is required to exercise SET and GET_VARIABLE together within a single transaction from a yamsql test.
arnaud-lacurie
force-pushed
the
apple/arnaud-lacurie/local-vars/6-yamsql
branch
from
September 5, 2026 17:50
8110ca5 to
50f2983
Compare
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.
Add local-variables.yamsql exercising SET TRANSACTION VARIABLE / GET_VARIABLE
end-to-end through the real SQL planner/executor path: basic round trips,
overwriting and retyping a variable within one transaction, the NULL-vs-never-set
distinction, UNDEFINED_PARAMETER on an unset reference, use as a table-valued
function argument, and coexistence with CREATE TEMPORARY FUNCTION.
The inline
setup:/setupReference:transaction-setup mechanism previously onlyallowed CREATE TEMPORARY FUNCTION statements; extend the allow-list to also
accept SET TRANSACTION VARIABLE, since it has the same transaction-local,
never-committed safety property that motivated the original restriction. This is
required to exercise SET and GET_VARIABLE together within a single transaction
from a yamsql test.
Stack created with GitHub Stacks CLI • Give Feedback 💬