Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
fc22de6
test(referential_tags): failing EDI-shaped end-to-end test (ITL-1023)
Nov 13, 2026
02b6235
feat(referential_tags): WIP representation, sources, select/drop, Joi…
Nov 13, 2026
c3c5e99
feat(referential_tags): row-preserving ops, renames, guards, async Jo…
Nov 13, 2026
c42eece
feat(referential_tags): renames per developer decision; EDI test on t…
Nov 13, 2026
880dcd4
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
853da82
test(referential_tags): existing tests pin plain tags where they asse…
Nov 13, 2026
1ec232e
feat(pipeline): saved job and pipeline format 0.3.0; v0.3 files load …
Nov 13, 2026
6120671
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
860045e
test(referential_tags): pin plain tags in main's torch golden case an…
Nov 13, 2026
6a6d72b
feat(function_pod): referential tags fall through a pod call (ITL-1023)
Nov 13, 2026
ed51400
fix(referential_tags): fall-through keeps exact types and returned ob…
Nov 13, 2026
5832772
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
3e12d62
fix(referential_tags): type-check clean; fall-through pod refuses to …
Nov 13, 2026
d8628af
test(pipeline): commit the saved-job fixture's CSV and Parquet files …
Nov 13, 2026
1fd2daa
test(objective): pin plain tags where the objective tests assume v0.3…
Nov 13, 2026
34fb2a0
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
4473e2e
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
4c0c687
docs(plan): ITL-1023 status log
Nov 13, 2026
5607af1
docs(plan): ITL-1017 merged source-info token plan
Nov 13, 2026
5e8028e
fix(referential_tags): one merged source-info token for a value merge…
Nov 13, 2026
aaff7da
docs(referential_tags): merged source-info token, changelog, open poi…
Nov 13, 2026
8d7e3c9
Merge remote-tracking branch 'origin/main' into eywalker/itl-1023-wor…
Nov 13, 2026
c78ba80
docs(plan): ITL-1017 status log
Nov 13, 2026
8c7cfb6
Merge origin/main into the referential tags slice (ITL-1023, ITL-1017)
Nov 14, 2026
0bfd72a
Merge origin/main (ITL-1074) into the referential tags slice (ITL-1023)
Nov 14, 2026
634ad40
fix(group_by): a referential non-key tag keeps its data column as a l…
Nov 14, 2026
99b5737
Merge origin/main (4dd015a4) into the referential tags slice (ITL-1023)
Nov 16, 2026
404066e
fix(referential_tags): main's new paths meet referential tags (ITL-1023)
Nov 16, 2026
177d5ad
fix(referential_tags): GroupBy key order, meta stripping and join err…
Nov 16, 2026
61129ae
fix(referential_tags): zero-row heads keep references; pin main's new…
Nov 16, 2026
f359aa0
docs: main's new pages pin plain tags on the referential tags slice (…
Nov 16, 2026
3e0ae5a
feat(join): a referential key that differs only in nullability joins …
Nov 16, 2026
22e7662
test(referential_tags): type-clean key nullability assertion (ITL-1023)
Nov 16, 2026
157632b
test: pin plain tags in main's remaining v0.3-shape suites (ITL-1023)
Nov 16, 2026
84d1312
feat(referential_tags): stored tables and saved jobs keep tag binding…
Nov 16, 2026
199221c
feat(referential_tags): refuse a database that cannot keep the marker…
Nov 16, 2026
8f7d50a
ci(coderabbit): review pull requests that target any base branch, on …
eywalker Nov 16, 2026
7d6c580
chore: merge the slice branch (.coderabbit.yaml, PR #405) into ITL-1019
Nov 16, 2026
fc1db0a
fix(pipeline): a saved-node error of a loaded job names the job file …
Nov 16, 2026
00818bd
fix(pipeline): refuse a saved source config whose bindings contradict…
Nov 16, 2026
ec5984a
fix(pipeline): check an explicitly empty tag_columns against the slot…
Nov 16, 2026
26d981a
feat(referential_tags): operator nodes store and derived sources pres…
Nov 16, 2026
cb3dbc4
refactor(operator_node): the stored-table check returns nothing; one …
Nov 16, 2026
3c51256
test(referential_tags): reach the DerivedSource binding check; log IT…
Nov 16, 2026
cecbaf3
feat(databases): a database states keeps_field_metadata; an undeclare…
Nov 16, 2026
25ff7db
feat(batch): Batch on referential tags (ITL-1017) — into the referent…
eywalker Nov 16, 2026
67435e0
feat(referential_tags): SelectColumns/DropColumns on referential tags…
eywalker Nov 16, 2026
57aaa5c
Merge origin/main (37716c76, ITL-1154) into the referential tags slic…
Nov 16, 2026
c111ca4
feat(referential_tags): stored tables and saved jobs keep tag binding…
eywalker Nov 16, 2026
69776b0
chore: merge the slice branch (PR #402 squash-merged) into ITL-1019 W3
Nov 16, 2026
40c57da
Merge the slice head c111ca47 (#402, ITL-1019) into the ITL-1154 refr…
Nov 16, 2026
7137e72
fix(databases): a SpiralDB retry publishes metadata whose write faile…
Nov 17, 2026
1e9565a
fix(databases): a SpiralDB write that stores no row never replaces st…
Nov 17, 2026
5261e9a
test(referential_tags): type-clean field metadata in the SpiralDB sto…
Nov 17, 2026
ded5305
fix(databases): SpiralDB writes a table's Arrow metadata before its r…
Nov 17, 2026
f030aab
fix(databases): a failed first SpiralDB write removes the metadata it…
Nov 17, 2026
edc98fd
Merge origin/main (62899bda: #408, #409, #410, #411) into the referen…
Nov 17, 2026
4b49640
fix(databases): a failed SpiralDB write puts the metadata entry back …
Nov 17, 2026
a6cf552
fix(databases): read the SpiralDB metadata snapshot before the nullab…
Nov 17, 2026
ac68895
Merge origin/main (7c735b7a, v0.3.0 release commit) into the referent…
Nov 17, 2026
01f3db4
docs(changelog): concurrent SpiralDB writers are not coordinated; fol…
Nov 17, 2026
6274a3c
chore: merge the refreshed slice (main 7c735b7a, v0.3.0) into ITL-101…
Nov 17, 2026
a7f08ed
test(referential_tags): meet main's SpiralDB column refusal and hash-…
Nov 17, 2026
ce32310
fix(operator_node): replayed rows carry the node's data context in th…
Nov 17, 2026
8b73ba7
feat(operators): TagBy / stream.tag_by makes data columns referential…
Nov 17, 2026
6aa2314
docs(referential-tags): describe the three moves by role after tag_by…
Nov 17, 2026
e037e58
Merge pull request #407 from metamorphic-labs/eywalker/itl-1019-w3-de…
eywalker Nov 17, 2026
e91d256
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
43bb0ef
Merge origin/main (23fd8f2a: #414, #415, #416) into the referential t…
Nov 17, 2026
eb32ab1
test(tag_by): a logged TagBy operator node stores its new tag marked …
Nov 17, 2026
9c48452
chore(changelog): fold the slice's fragments into changelog.d/ITL-102…
Nov 17, 2026
a6b4a17
docs(referential-tags): select and drop act on a referential tag by r…
Nov 17, 2026
3ab814e
refactor(referential_tags): remove ReferenceMaterializationWarning (I…
Nov 17, 2026
194254e
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
8cd398f
fix(tag_by): keep the input's column layout and data context (ITL-1175)
Nov 17, 2026
424f731
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
5292a60
revert(referential_tags): keep ReferenceMaterializationWarning (ITL-1…
Nov 17, 2026
1e585a7
Merge origin/main (565201b2: #417) into the referential tags slice (I…
Nov 17, 2026
27fee5a
feat(merge_join): handle referential tags as Join does (ITL-1194)
Nov 17, 2026
83ff606
fix(tag_by): keep each row's data context key; correct the spec on LO…
Nov 17, 2026
35579f8
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
01c3b72
docs(design_issues): log ST5, the two tag orders of ArrowTableStream …
Nov 17, 2026
447597b
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
50b580b
fix(referential_tags): address the CodeRabbit review of the slice (IT…
Nov 17, 2026
016052a
docs(referential_tags): log the deferred review findings (ITL-1199 to…
Nov 17, 2026
fc205da
docs(referential-tags): sort the MergeJoin sample's rows before print…
Nov 17, 2026
5dd0634
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
378eca2
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
d7d1b34
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
38478e0
Merge origin/main (232ee360: #418) into the referential tags slice (I…
Nov 17, 2026
05deee1
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
a373ca6
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
09ffdf7
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
0937242
Merge pull request #423 from metamorphic-labs/eywalker/itl-1194-merge…
eywalker Nov 17, 2026
460ff01
chore(changelog): fold the ITL-1194 fragment (#423) into changelog.d/…
Nov 17, 2026
816d8c8
Merge remote-tracking branch 'origin/eywalker/itl-1023-workshop-slice…
Nov 17, 2026
bd8f020
Merge branch 'eywalker/itl-1175-operator-and-stream-method-to-mark' i…
Nov 17, 2026
e43c609
docs(design_issues): log AB1, the async barrier input's column order …
Nov 17, 2026
c4cee17
Merge pull request #421 from metamorphic-labs/eywalker/itl-1195-opera…
eywalker Nov 17, 2026
b77cb01
refactor(data_tags): rename "referential tag" to "data-tag" (ITL-1023)
Nov 17, 2026
b011809
Merge origin/main (51be5e4e: #422 add_tags, #419) into the data-tags …
Nov 17, 2026
c2aafc4
fix(data_tags): data-tags come first among the data columns (ITL-1205)
Nov 17, 2026
20309a0
feat(add_tags): AddTags works on a stream with data-tags (ITL-1196, I…
Nov 17, 2026
0248fc0
fix(data_tags): async rows keep data-tags first; fall-through prevali…
Nov 17, 2026
8d6a1d9
docs(data_tags): answer the CodeRabbit doc findings on PR #342 (ITL-1…
Nov 17, 2026
3817334
Merge origin/main (7c8c5efb: #425 Starlight docs site) into the data-…
Nov 17, 2026
66d6ed7
fix(side_effects): pass a data-tag only to a parameter that takes a k…
Nov 17, 2026
488a428
feat(spiraldb): SpiralDBTableSource.where() restricts rows without ch…
Nov 17, 2026
c56b52d
Merge origin/main (9698dbcc: #342 data-tags slice, squashed) into ITL…
Nov 18, 2026
80ea3fe
fix(spiraldb): answer the Copilot review of PR #435 (ITL-1218)
Nov 18, 2026
049abb9
Merge origin/main (4a754eac: #428 CI job names) into 1218-SOURCE
Nov 18, 2026
c3799b1
fix(pipeline): refuse one table restricted two ways in one pipeline (…
Nov 18, 2026
ef3f1d4
fix(pipeline): check restrictions beneath every input, before recordi…
Nov 18, 2026
46392e5
fix(pipeline): compare restrictions whatever the order of their condi…
Nov 18, 2026
6ddd13a
test(sources): cover several conditions in one where() call (ITL-1218)
Nov 18, 2026
dee29b4
Merge remote-tracking branch 'origin/main' into eywalker/itl-1218-sou…
Nov 18, 2026
7241212
feat(types): public Condition type for source restrictions (ITL-1218)
Nov 18, 2026
eed7a61
fix(pipeline): check a stream against a captured step with its hash (…
Nov 18, 2026
660fdfd
fix(sources): refuse a CachedSource over a restricted source (ITL-1218)
Nov 18, 2026
91ae315
Merge remote-tracking branch 'origin/main' into eywalker/itl-1218-sou…
Nov 19, 2026
93c7b90
feat(operators): refuse an operator cache over a restricted source (I…
Nov 19, 2026
2f9ddc5
fix(spiraldb, operators): guard every entry of a caching operator; aw…
Nov 19, 2026
41038d5
Merge remote-tracking branch 'origin/main' into eywalker/itl-1218-sou…
Nov 19, 2026
685ec23
fix(spiraldb, pipeline): restrictions seen through proxies and caches…
Nov 19, 2026
fb259f6
fix(spiraldb, pipeline): instants from calendar fields; slots matched…
Nov 19, 2026
e5eef35
test(spiraldb): timestamp columns in every role and layout, sync and …
Nov 19, 2026
48e93ea
Merge remote-tracking branch 'origin/main' into eywalker/itl-1218-sou…
Nov 19, 2026
9c58c5e
refactor(pipeline): rename RunSummary.restrictions to RunSummary.cond…
Nov 19, 2026
aaed6b4
Merge remote-tracking branch 'origin/main' into eywalker/itl-1218-sou…
Nov 20, 2026
1439567
refactor(restrictions): own module, typed protocol members, types pac…
Nov 20, 2026
bf621d3
docs(restrictions): state what bind compares; test LOG stores and REP…
Nov 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 0 additions & 202 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -61246,208 +61246,6 @@
}
}
],
"./src/orcapod/types.py": [
{
"code": "reportMissingTypeArgument",
"range": {
"startColumn": 28,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 19,
"lineCount": 1
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 16,
"lineCount": 1
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 15,
"lineCount": 1
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 16,
"lineCount": 1
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 14,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 38,
"endColumn": 43,
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
"startColumn": 8,
"endColumn": 22,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 53,
"endColumn": 84,
"lineCount": 1
}
},
{
"code": "reportReturnType",
"range": {
"startColumn": 19,
"endColumn": 36,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 35,
"lineCount": 1
}
},
{
"code": "reportExplicitAny",
"range": {
"startColumn": 37,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportExplicitAny",
"range": {
"startColumn": 38,
"endColumn": 41,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 34,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportImplicitStringConcatenation",
"range": {
"startColumn": 16,
"endColumn": 57,
"lineCount": 2
}
},
{
"code": "reportImplicitOverride",
"range": {
"startColumn": 8,
"endColumn": 15,
"lineCount": 1
}
},
{
"code": "reportImplicitStringConcatenation",
"range": {
"startColumn": 16,
"endColumn": 50,
"lineCount": 2
}
},
{
"code": "reportImplicitStringConcatenation",
"range": {
"startColumn": 16,
"endColumn": 52,
"lineCount": 2
}
},
{
"code": "reportImplicitStringConcatenation",
"range": {
"startColumn": 16,
"endColumn": 48,
"lineCount": 2
}
}
],
"./src/orcapod/utils/arrow_utils.py": [
{
"code": "reportExplicitAny",
Expand Down
64 changes: 63 additions & 1 deletion .zed/rules
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,8 @@ audit is `docs/dev/specs/itl-1271-order-invariance-audit.md`.
## Project layout

src/orcapod/
types.py — Schema, ColumnConfig, ContentHash
types/ — Schema, ColumnConfig, ContentHash (__init__.py);
Condition (condition.py)
system_constants.py — Column prefixes and separators
errors.py — InputValidationError, DuplicateTagError
config.py — Config dataclass
Expand Down Expand Up @@ -1230,6 +1231,67 @@ data. The rules:
only after the read succeeded. Without key columns a row's record id is its position: a
change of row order is a change; with one, only content counts
(reload.same_rows(..., ordered=), decided by the caller; in doubt, order counts).
- A restriction is not an operator (developer, November 17, 2026, ITL-1218). It is attached
to a source, chooses which of its rows flow, and changes no row, schema, DAG node or
identity: content_hash, pipeline_hash, source_id, schema, system-tag column names and
every row's record id equal the unrestricted source's (a positional record id is never
renumbered). Selecting rows as part of what a pipeline computes is an operator
(SemiJoin, PolarsFilter). The conditions are one public class, orcapod.types.Condition
(defined in types/condition.py; developer, November 18, 2026): row conditions only, no limit, no source, in no hash; a
future in-pipeline filter operator is to take the same class (its identity then: ITL-1265).
Its factory Condition.of(mapping=None, /, **columns) takes where()'s arguments and does
every check that needs no table (None, a value not exactly bool/int/float/str/
bytes/datetime/date, mapping against keyword); combined adds two and refuses a
contradiction; equality is by value, order-free, exact types, floats as Orcapod matches them
(0.0 equals -0.0, NaN equals NaN), an aware datetime by its instant (fold counts, zones do
not; never Python's ==, which ignores fold within one tzinfo), with a consistent hash.
That equality decides whether two restrictions are one, never which rows a source returns:
a condition is pushed down as column == value and the table system's equality decides
(developer, November 19, 2026: a NaN, an infinity or a signed zero is accepted, pushed down
and documented, never filtered on the client or refused; a NaN or infinite value is saved
as {"float": "nan" | "inf" | "-inf"}); text()/str, and
to_config/from_config (the saved where mapping). Internally terms (column, operator,
value), equality only today; the public surface names no operator. Never add a second
restriction class: a limit stays the source's own (limit=). Today only
SpiralDBTableSource.where(mapping=None, /, **columns) exists: Condition.of, then the
source checks it against its table (unknown column, the column's exact Python type and
Arrow range, no conversion) and combines it with where='s, applied by SpiralDB in the
scan. where() is _copy() then _apply_restriction() in place on the copy, the future
public copy() and apply_restriction(); other source kinds and limit() are ITL-1219.
A source states its restriction through two read-only members of SourceProtocol,
condition (the empty Condition when it reads every row) and row_limit (None
for none): RootSource answers the defaults, SpiralDBTableSource its own, and a
source over another (CachedSource, SourceProxy) answers for itself only
(developer, November 20, 2026: StreamProtocol gets them when restrictions reach
general streams, ITL-1219). Every rule that reads them is in one module,
pipeline/restrictions.py, typed, never probing a private attribute.
RunSummary records each restricted source by slot: conditions (slot to Condition),
limits (slot to limit), restricted_source_ids (every such slot), filled by one walk;
the saved job keeps where and limit in the source config. A slot's new restriction need not
match its previous one (bind does not compare the two), but bind refuses, before replacing
any binding, a bind after which two slots would read one source identity under different
restrictions (below). A job run over a restricted source feeding GroupBy, Batch or MergeJoin issues one RestrictedAggregationWarning.
A pipeline keeps one restriction (or none) per source identity (a restriction leaves the
identity unchanged), so one table restricted two ways (or with and without a restriction) in
one pipeline is refused (restrictions.require_one_restriction, over the sources the streams
read now, sources_read; nothing is remembered between checks, since a rebound slot changes
what they read) at capture, at compile, by bind before it binds and at the start of every
run (refuse_restriction_conflicts), whatever streams lead there: projections, operator
chains, streams built before the capture. A bind's walk matches the job's own slots by object
(Rebinding), never by name. RunSummary keeps one condition and one limit per slot (ITL-1293). Every restriction walk goes through a slot's bound source,
a SourceProxy's delegate and a CachedSource's source (_streams_beneath); a
DerivedSource is a root. A CachedSource
over a restricted source is refused at construction (a cache is kept under the table's
identity; developer, November 18, 2026), and so is an operator job node that caches (LOG or
REPLAY) over a restricted source (developer, November 19, 2026: its cache is kept under the
node's identity): restrictions.refuse_restricted_operator_cache(s), called where the cache mode
is attached, by bind before it binds, before a job distributes its databases, by the
upstreams setter, by execute (on the streams it is handed) and async_execute, and at
the start of job.run(), run_async() and a job node's run(), before any source is
checked or anything computed or written; a new way to run or rewire a caching operator node
calls it too (it reads the node's public cache_mode). CacheMode.OFF and function nodes
are not concerned. The refusal is for now: how an operator node logs and replays is to be
redesigned to load its cache and then apply the restriction (TODO(ITL-1219)).
- Empty data → ArrowTableSource raises ValueError("Table is empty").
- A side-effect job node delivers only when it runs (developer, November 13, 2026, ITL-1091):
job.run(), node.run() (state-driven, ITL-1095: a node holding a current run delivers
Expand Down
68 changes: 65 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ audit is `docs/dev/specs/itl-1271-order-invariance-audit.md`.

```
src/orcapod/
├── types.py # Schema, ColumnConfig, ContentHash
├── types/ # Schema, ColumnConfig, ContentHash (__init__.py);
│ # Condition (condition.py)
├── system_constants.py # Column prefixes and separators
├── errors.py # InputValidationError, DuplicateTagError
├── config.py # Config dataclass
Expand Down Expand Up @@ -1020,10 +1021,10 @@ current data context are the current entries.

### Schema types and ColumnConfig

`Schema` (`types.py`) — immutable `Mapping[str, DataType]` with `optional_fields` support.
`Schema` (`types/__init__.py`) — immutable `Mapping[str, DataType]` with `optional_fields` support.
`output_schema()` always returns `(tag_schema, data_schema)` as a tuple of Schemas.

`ColumnConfig` (`types.py`) — frozen dataclass controlling which column groups are included.
`ColumnConfig` (`types/__init__.py`) — frozen dataclass controlling which column groups are included.
Fields: `meta`, `context`, `source`, `system_tags`, `content_hash`, `sort_by_tags`.
Normalize via `ColumnConfig.handle_config(columns, all_info)` at the top of `output_schema()`
and `as_table()` methods. `all_info=True` sets everything to True.
Expand Down Expand Up @@ -1274,6 +1275,67 @@ data. The rules:
only after the read succeeded. Without key columns a row's record id is its position: a
change of row order is a change; with one, only content counts
(`reload.same_rows(..., ordered=)`, decided by the caller; in doubt, order counts).
- A restriction is not an operator (developer, November 17, 2026, ITL-1218). It is attached
to a source, chooses which of its rows flow, and changes no row, schema, DAG node or
identity: `content_hash`, `pipeline_hash`, `source_id`, schema, system-tag column names and
every row's record id equal the unrestricted source's (a positional record id is never
renumbered). Selecting rows as part of what a pipeline computes is an operator
(`SemiJoin`, `PolarsFilter`). The conditions are one public class, `orcapod.types.Condition`
(defined in `types/condition.py`; developer, November 18, 2026): row conditions only, no limit, no source, in no hash; a
future in-pipeline filter operator is to take the same class (its identity then: ITL-1265).
Its factory `Condition.of(mapping=None, /, **columns)` takes `where()`'s arguments and does
every check that needs no table (`None`, a value not exactly `bool`/`int`/`float`/`str`/
`bytes`/`datetime`/`date`, mapping against keyword); `combined` adds two and refuses a
contradiction; equality is by value, order-free, exact types, floats as Orcapod matches them
(0.0 equals -0.0, NaN equals NaN), an aware datetime by its instant (`fold` counts, zones do
not; never Python's `==`, which ignores `fold` within one tzinfo), with a consistent hash.
That equality decides whether two restrictions are one, never which rows a source returns:
a condition is pushed down as `column == value` and the table system's equality decides
(developer, November 19, 2026: a NaN, an infinity or a signed zero is accepted, pushed down
and documented, never filtered on the client or refused; a NaN or infinite value is saved
as `{"float": "nan" | "inf" | "-inf"}`); `text()`/`str`, and
`to_config`/`from_config` (the saved `where` mapping). Internally terms (column, operator,
value), equality only today; the public surface names no operator. Never add a second
restriction class: a limit stays the source's own (`limit=`). Today only
`SpiralDBTableSource.where(mapping=None, /, **columns)` exists: `Condition.of`, then the
source checks it against its table (unknown column, the column's exact Python type and
Arrow range, no conversion) and combines it with `where=`'s, applied by SpiralDB in the
scan. `where()` is `_copy()` then `_apply_restriction()` in place on the copy, the future
public `copy()` and `apply_restriction()`; other source kinds and `limit()` are ITL-1219.
A source states its restriction through two read-only members of `SourceProtocol`,
`condition` (the empty `Condition` when it reads every row) and `row_limit` (`None`
for none): `RootSource` answers the defaults, `SpiralDBTableSource` its own, and a
source over another (`CachedSource`, `SourceProxy`) answers for itself only
(developer, November 20, 2026: `StreamProtocol` gets them when restrictions reach
general streams, ITL-1219). Every rule that reads them is in one module,
`pipeline/restrictions.py`, typed, never probing a private attribute.
`RunSummary` records each restricted source by slot: `conditions` (slot to `Condition`),
`limits` (slot to limit), `restricted_source_ids` (every such slot), filled by one walk;
the saved job keeps `where` and `limit` in the source config. A slot's new restriction need not
match its previous one (bind does not compare the two), but `bind` refuses, before replacing
any binding, a bind after which two slots would read one source identity under different
restrictions (below). A job run over a restricted source feeding `GroupBy`, `Batch` or `MergeJoin` issues one `RestrictedAggregationWarning`.
A pipeline keeps one restriction (or none) per source identity (a restriction leaves the
identity unchanged), so one table restricted two ways (or with and without a restriction) in
one pipeline is refused (`restrictions.require_one_restriction`, over the sources the streams
read now, `sources_read`; nothing is remembered between checks, since a rebound slot changes
what they read) at capture, at compile, by `bind` before it binds and at the start of every
run (`refuse_restriction_conflicts`), whatever streams lead there: projections, operator
chains, streams built before the capture. A bind's walk matches the job's own slots by object
(`Rebinding`), never by name. `RunSummary` keeps one condition and one limit per slot (ITL-1293). Every restriction walk goes through a slot's bound source,
a `SourceProxy`'s delegate and a `CachedSource`'s source (`_streams_beneath`); a
`DerivedSource` is a root. A `CachedSource`
over a restricted source is refused at construction (a cache is kept under the table's
identity; developer, November 18, 2026), and so is an operator job node that caches (`LOG` or
`REPLAY`) over a restricted source (developer, November 19, 2026: its cache is kept under the
node's identity): `restrictions.refuse_restricted_operator_cache(s)`, called where the cache mode
is attached, by `bind` before it binds, before a job distributes its databases, by the
`upstreams` setter, by `execute` (on the streams it is handed) and `async_execute`, and at
the start of `job.run()`, `run_async()` and a job node's `run()`, before any source is
checked or anything computed or written; a new way to run or rewire a caching operator node
calls it too (it reads the node's public `cache_mode`). `CacheMode.OFF` and function nodes
are not concerned. The refusal is for now: how an operator node logs and replays is to be
redesigned to load its cache and then apply the restriction (`TODO(ITL-1219)`).
- Empty data → `ArrowTableSource` raises `ValueError("Table is empty")`.
- A side-effect job node delivers only when it runs (developer, November 13, 2026, ITL-1091):
`job.run()`, `node.run()` (state-driven, ITL-1095: a node holding a current run delivers
Expand Down
Loading
Loading