[TEST](pyspark) Batch per-test DataFrames into one collect#577
Open
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Open
[TEST](pyspark) Batch per-test DataFrames into one collect#577Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Conversation
Seth Fitzsimmons (sethfitz)
temporarily deployed
to
staging
July 20, 2026 21:37 — with
GitHub Actions
Inactive
🗺️ Schema reference docs preview is live!
Note ♻️ This preview updates automatically with each push to this PR. |
Seth Fitzsimmons (sethfitz)
force-pushed
the
pyspark-test-batching
branch
from
July 21, 2026 03:05
16977cb to
68eda76
Compare
Seth Fitzsimmons (sethfitz)
temporarily deployed
to
staging
July 21, 2026 03:06 — with
GitHub Actions
Inactive
Victor Schappert (vcschapp)
self-requested a review
July 21, 2026 17:42
Victor Schappert (vcschapp)
approved these changes
Jul 21, 2026
Victor Schappert (vcschapp)
left a comment
Collaborator
There was a problem hiding this comment.
1.5X-3X test speed-up. I'll take it!
Seth Fitzsimmons (sethfitz)
force-pushed
the
generalize-field-path
branch
from
July 21, 2026 18:05
0d507b8 to
7f190e1
Compare
Seth Fitzsimmons (sethfitz)
requested review from
a team and
John McCall (lowlydba)
as code owners
July 21, 2026 18:05
test_column_patterns.py and test_constraint_expressions.py each built a DataFrame and collected once per test -- ~200 Spark jobs between them. Both now use a case registry: each _Case carries its input column, the check over it, and a predicate on the result; a module-scoped fixture packs every case's input into one wide single-row DataFrame, applies every check in a single select, and collects once. This is the batch-once pattern the generated conformance harness uses. Every prior assertion is preserved. Timings (remaining floor is Spark session startup): test_column_patterns.py 6.4s -> 4.0s (33 -> 37 cases) test_constraint_expressions.py 16.9s -> 5.1s (164 -> 165 cases) The extra cases come from splitting valid/invalid two-row tests into explicit per-input cases; no coverage dropped. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Seth Fitzsimmons (sethfitz)
force-pushed
the
pyspark-test-batching
branch
from
July 21, 2026 18:22
68eda76 to
e7ddca5
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.
Follow-up to #572, stacked on its
generalize-field-pathbranch (the column_patterns cases use thenested_map_{keys,values}_checkhelpers #572 adds). I'll rebase onto the integration branch once #572 merges.Closes #576.
What changed
test_column_patterns.pyandtest_constraint_expressions.pyeach built a DataFrame andcollect()ed once per test — roughly 200 Spark jobs between them. Both now use a case registry: each_Casecarries its input column, the check over it, and a predicate on the result; a module-scoped fixture packs every case's input into one wide single-row DataFrame, applies every check in a singleselect, and collects once. This is the batch-once pattern the generated conformance harness already uses.Effect
Every prior assertion is preserved — the distinct asserted literals all survive and the parametrized cases stay green.
test_column_patterns.pytest_constraint_expressions.pyThe extra cases come from splitting valid/invalid two-row tests into explicit per-input cases; no coverage is dropped. The remaining floor is Spark session startup.