test+docs(gfql): pin cache-key completeness, shrink two row_pipeline docstrings - #1866
Merged
Conversation
… two docstrings Applying the settled rule to row_pipeline.py, largest remaining prose file. Coverage check first (the lesson from #1864): _order_keys_hold_list_like_values has 18 tests, so its trigger enumeration is already specified -- it becomes a pointer. _single_alias_cache_key had ONE, about clearing rather than keying, so its two real claims were unpinned. A wrong cache key serves a stale expression: a silent wrong answer no existing test would catch. Added test_single_alias_cache_key.py: dtype must be in the key (names alone would serve a float expression for a string column), parameterized dtypes must not collide -- with asserted so the hazard is visible rather than described -- plus expr/alias/nan_free/schema-order, hashability. Both docstrings then drop to ~11 lines, keeping only what tests cannot say: the str(dtype) rationale, why parser availability is deliberately unkeyed, and the directive not to tighten an intentionally-broad decline (over-declining costs a fallback, under-declining returns a wrong ORDER). Registered in POLARS_TEST_FILES and guarded with importorskip -- both halves of yesterday's lane lesson. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
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.
Applying the settled rule to
row_pipeline.py, the largest remaining prose file — and coverage check first, which is the correction from #1864.The split
_order_keys_hold_list_like_values(21 lines) has 18 tests, so its trigger enumeration is already specified. It becomes a pointer._single_alias_cache_key(25 lines) had one test, and that one is about clearing the memo, not keying it. Its two real claims were unpinned — and a wrong cache key serves a stale expression, which is a silent wrong answer no existing test would catch. So per the rule: add the test.New: test_single_alias_cache_key.py
Datetime == Datetime('ns')asserted so the hazard is visible rather than describedWhat survives in prose
The
str(dtype)rationale, why parser availability is deliberately unkeyed (a process property, not an argument — so no entry outlives a departed parser), and the directive not to tighten an intentionally-broad decline: over-declining costs a fallback, under-declining returns a silently wrong order.Both registered in
POLARS_TEST_FILESand guarded withimportorskip— both halves of yesterday's lane lesson.🤖 Generated with Claude Code
https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi