Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rzt6RXiGCzNw4zHz8RtTUE
…column Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rzt6RXiGCzNw4zHz8RtTUE
Documentation build overview
19 files changed ·
|
Contributor
Author
|
Superseded by #641 |
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.
Note
The following content was generated by AI.
What this changes
A sum through a relation names its columns after a dot:
sum(x, over=l.a)reads from columna, andsum(x, by=l.b)lands onb.shift,sum_backandpositiontake a dottedalong=.atis unchanged.sum(x, by=l, over=a, into=b)sum(x, over=l.a)sum(x, by=l, over=[a, b], into=[c, d])sum(x, by=l.[c, d])shift(x, along=d, by=l, within=c)shift(x, along=l.a, within=c)sum_back(x, along=d, by=l, within=c)sum_back(x, along=l.a, within=c)position(d, by=l, within=c)position(l.a, within=c)This is a break with no alias. The retired spellings are refused by the call
shape, with the signature quoted back. Every example, fixture and page moves in
this PR.
over=names the columns the sum reads from and the relation supplies the otherend: the one value column left over is what it lands on, and the key columns it
does not name are joined on.
by=names the landing set and the rest of the keyis summed away. A key column named beside a value column is joined on; where
only key columns are named, they are what the sum lands on, which is how a bare
relation is still summed.
Why
This is the design of #509, ported onto current
mainrather than rebased:mainhas since renamedWalktoDirection(#494), madePartitiona classof its own (#559) and dropped relation lists (#533), so the old branch's diff no
longer applies. #509 stays closed and its branches are untouched.
The review on #509 asked for two changes, and both are here.
x[rel]indexingis left out, so
atkeeps its spelling and the surface to argue about issmaller.
over=no longer lands on every value column silently: where more thanone is left over it is refused, naming the
by=that says which.Scope, evidence, gates and what was left out
Scope the user chose
x[rel].by=admits key columns, so the landing set can be named exactly.New refusals, each with a test
over=leaves several value columns, or none — the over-capture the reviewfound (
technologyriding along); the message names theby=rewrite.by=lands twice on one dimension (by=ends.[bus0, bus1]).by=sums two key columns over one dimension away.within=beside a bare-dimensionalong=.over=,along=orby=.over=r.graised
KeyError: 'r'on feat(language): a relation is summed with over=/by= and indexed with x[rel] #509.One guard deleted
_check_joined's "two joined columns over one dimension" is unreachable underthe dot form:
joinedis only ever the key columns of a valued relation, andthe declaration already refuses two of those over one dimension. Its sibling —
a joined column that is also consumed — stays, and
tests/test_dimensions.py::test_a_joined_column_is_not_also_consumedcovers it.The row that reached the deleted branch,
a-call-joining-one-dimension-through-two-columns, is gone with it.Guard table
Each new guard disabled in turn,
tests/test_validation.py,test_dimensions.py,test_expansion.pyandtest_lowering.pyrun:over=two columns over one dimensionover=leaves no value columnover=leaves several value columnsby=sums nothing awayby=lands twice on one dimensionby=sums two columns over one dimension awaywithin=on a bare dimensionby=without a columnwithin=names a key columnGates
pytest— 1376 passed, 6 skipped.ruff checkandruff format --check— clean.pyrefly check— the same findings asmain, less two the change removes.mkdocs build— clean.--strictaborts on the sandbox's blocked fetch ofhttps://docs.python.org/3/objects.inv, which is the network and not thepages.
compile-texwas not run: this sandbox has no TeX toolchain.notation page, the operator page and the golden output. The golden
.outfiles came back byte for byte, because the math is the same.
Deliberately not done
x[rel]indexing, and the retirement ofat.by=.maindropped them in feat(language): a call walks one relation, so by= names one rather than a list #533 and this keepsthat.
by=rel.blands on
band sums the rest away. Three-column bare relations are the onlycase that loses, and the corpus has none.
Departures from AGENTS.md
pixiin this sandbox, so the gates ran in auvvirtualenv on Python3.13 with the dependencies installed from PyPI.
../wt/worktree.Generated by Claude Code