NO-SNOW: Fix test_large_series_items and regr_syy#4053
Merged
sfc-gh-joshi merged 3 commits intomainfrom Jan 21, 2026
Merged
Conversation
f6ac8b2 to
36f8225
Compare
sfc-gh-helmeleegy
approved these changes
Jan 21, 2026
sfc-gh-aling
approved these changes
Jan 21, 2026
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.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-NNNNNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
This PR fixes 3 issues:
(1)
src/snowflake/snowpark/functions.py::snowpark.functions.regr_syywas failing because the doctest did not sort the query output.(2)
tests/integ/modin/series/test_items.py::test_items_large_seriescompletes in ~40 seconds when run locally in single-thread mode, but when parallelized withpytest-xdist(as in Jenkins), hangs for a very long time. This occurs because the test creates 8193 SqlCounter instances in a loop. Each instance then unconditionally performs an expensivetraceback.format_stack()call (here); some individual calls on my machine began taking upwards of 9 seconds to complete. This may be amplified by the fact that each SqlCounter instance must acquire an Rlock upon creation, but I didn't investigate too deeply--at any rate, lifting the SqlCounter out of the loop resolves the issue locally (passing Jenkins run).(3) Cursor notes that the SqlCounter code to generate a traceback is run unconditionally whether a test succeeds or fails. Though this operation typically takes ~0.1ms, the Jenkins runner runs >40k tests for pandas, and there may be other tests with outlier stack traces like this one that can benefit. As such, this PR also adjusts the SqlCounter to only generate a stack trace when counts fail.
Benchmark of serial
pytest tests/integ/modin/series/test_items.pyfor a very rough estimate of speed improvement:Always generating stack trace:
Skipping stack trace computation:
The mean difference of 0.3s is not statistically significant at this sample size, but it's promising all the same, and may let us shave a few minutes off each CI run when considering the size of the pandas codebase.