Repository navigation
SNOW-3972121: tolerate extra CURRENT_DATABASE/SCHEMA queries in stored-proc tests - #4320
Merged
sfc-gh-bkogan merged 1 commit intoAug 19, 2026
Conversation
sfc-gh-bkogan
requested review from
sfc-gh-jzeng,
sfc-gh-mayliu and
sfc-gh-yuwang
and removed request for
a team
August 19, 2026 18:19
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Snowfort 10.30.100 clones
test-v1.53.1becauseinformation_schema.packagesstill lists snowpark 1.53.1, but the stored-proc runtime is 1.54.0 with snowflake-connector-python >= 4.7.1. That connector no longer caches database/schema after CREATE TEMP TABLE/STAGE, so extraSELECT CURRENT_DATABASE()/SELECT CURRENT_SCHEMA()queries show up and exact query-count asserts fail.This is not a 1.53.1 product regression. The same Snowfort mismatch already filed as SNOW-3958345 on 10.30.10. The test-side fix is already on
main/test-v1.54.0. This ports it ontotest-v1.53.1so Snowfort stops failing on the branch it actually clones.Tickets
test_cache_result_query:assert 4 == 2)test_session_stage_created_once: expectedcall_count == 1, got 3; alsotest_large_query_breakdown.py)Already on main
fb3ac1e79) initialin [1, 3]/in [2, 4]b99b89b3d) filter CURRENT_DATABASE/SCHEMA, then assert remaining counts4392522fb)_filter_metadata_querieshelper intest_large_query_breakdown.pyThis PR
test_cache_result_query: drop CURRENT_DATABASE/SCHEMA from history, thenassert len(filtered_queries) == 2test_session_stage_created_once:assert patched_run_query.call_count in [1, 3]test_large_query_breakdown.py: same metadata-query filter on history andrun_querycall countsWhich Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-3972121
Also SNOW-3972180
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Filter (or allow) the extra CURRENT_DATABASE/SCHEMA round-trips that connector >= 4.7.1 issues after CREATE TEMP TABLE/STAGE, matching the assertions already on main.