From 13f4c1764ca8bfe1b560f9600fe5a285fa709b34 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 20:02:29 -0800 Subject: [PATCH 1/6] feat(operators): nine more provisional operators; provisional library value types declarable in golden cases (ITL-1279, ITL-1324) GroupBy, TagBy, AddTags, MergeJoin, MapTags, MapColumns, Pick, Index and Batch join PolarsFilter in PROVISIONAL_OPERATORS (developer-approved list), each naming the issue that decides its identity; their classes set PROVISIONAL. No operator's identity or output changes. Each use of a provisional library value type is noted by its extension name (warn_provisional), and golden cases may declare those names, so the golden tool refuses a frozen case that uses one directly without declaring it. The five mixed golden cases are split under their own names by a predicate on the items' types (provisional_types_of), checked against every fixture class's identity record. The golden files themselves are not relocated yet: that runs last, on the coordinator's word. Co-Authored-By: Claude Opus 5.5 --- .zed/rules | 24 +- CLAUDE.md | 24 +- changelog.d/ITL-1279.md | 16 + docs/concepts/arrays.md | 5 + docs/concepts/operators.md | 46 ++- .../scripts/itl_1279/measure_relocation.py | 197 ++++++++++++ docs/dev/scripts/itl_1279/relocation_proof.py | 88 ++++++ docs/reference/golden-hashes.md | 68 ++-- src/orcapod/core/operators/add_tags.py | 3 + src/orcapod/core/operators/batch.py | 3 + src/orcapod/core/operators/group_by.py | 3 + src/orcapod/core/operators/index.py | 3 + src/orcapod/core/operators/mappers.py | 6 + src/orcapod/core/operators/merge_join.py | 3 + src/orcapod/core/operators/pick.py | 3 + src/orcapod/core/operators/provisional.py | 23 ++ src/orcapod/core/operators/tag_by.py | 3 + src/orcapod/logical_types/provisional.py | 13 +- .../operators/test_provisional_operators.py | 177 ++++++++++- tests/test_hashing/golden/README.md | 12 +- tests/test_hashing/golden/cases.py | 295 +++++++++++++++--- .../golden/test_golden_provisional_types.py | 101 ++++++ .../test_hashing/golden/test_golden_store.py | 157 +++++++++- .../test_provisional_hash_warning.py | 25 ++ 24 files changed, 1182 insertions(+), 116 deletions(-) create mode 100644 changelog.d/ITL-1279.md create mode 100644 docs/dev/scripts/itl_1279/measure_relocation.py create mode 100644 docs/dev/scripts/itl_1279/relocation_proof.py create mode 100644 tests/test_hashing/golden/test_golden_provisional_types.py diff --git a/.zed/rules b/.zed/rules index 96ffebf28..aaa597565 100644 --- a/.zed/rules +++ b/.zed/rules @@ -442,7 +442,9 @@ Developer, November 12, 2026 (ITL-981); see `docs/concepts/arrays.md` and (developer, November 13, 2026, ITL-1068; moved past 0.4.0rc1 on November 17, 2026): their extension names are listed in `provisional` of `contexts/logical_types.json`, and using one issues `ProvisionalHashWarning` once per type - per process. A new library value type must be added to that list. The list never enters a + per process. A new library value type must be added to that list. Its golden entries live in the + provisional golden files (ITL-1324), and so do those of a user class with a field of such a + type, whose identity embeds the type's identifier. The list never enters a hash, identifier or stored path. ## User classes: exact and structural @@ -498,9 +500,16 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current the release step for every version. A withdrawn version is never released again. - Provisional operators are outside the freeze (developer, November 18, 2026, ITL-1266): `orcapod.operators.PROVISIONAL_OPERATORS` (`core/operators/provisional.py`) is the one - list (name to the issue deciding its identity; today `PolarsFilter`), and each listed class - sets `PROVISIONAL = True` (a test checks they agree). Building one issues - `ProvisionalHashWarning` once per operator per process. A golden case that depends on one + list (name to the issue deciding its identity), and each listed class sets + `PROVISIONAL = True` (a test checks they agree, and that every exported operator is either + provisional or frozen). The list (developer, November 19, 2026, ITL-1279: "anything whose + identity choice isn't obvious and feels solid should be put into provisional first"): + `PolarsFilter`, `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`, `MapTags`, `MapColumns`, + `Pick`, `Index`, `Batch`. Frozen: `Join`, `SemiJoin`, `MapData`, the Select/Drop column + operators, `DropNulls`. An operator joins the group only while no release has frozen its + values, and leaves it when its identity is decided (before or at a release), never the other + way after a release. Building one (directly, through a stream method, or by loading a saved + job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a case that builds an undeclared one); its entries live in `data//provisional/.json`, listed in `golden.provisional` of the manifest, @@ -509,7 +518,12 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current context. `generate_golden_hashes.py --relocate` moves entries, values unchanged, between frozen and provisional files; an operator leaving the group has its entries relocated into a frozen file before the release step. Never put a value that depends on a provisional - operator in a frozen file. + operator in a frozen file. The provisional library value types are outside the freeze the + same way (ITL-1324): a case declares one by extension name + (`provisional=("orcapod.numpy.ndarray",)`), and each use of one is noted for the refusal. + The refusal sees a direct use only: a user class with a field of such a type embeds its + identifier in an identity built once and cached, so golden items are split by + `cases.provisional_types_of` (checked against every fixture class's identity record). - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/CLAUDE.md b/CLAUDE.md index b00961afe..61f3b86fe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -453,7 +453,9 @@ Developer, November 12, 2026 (ITL-981); see `docs/concepts/arrays.md` and (developer, November 13, 2026, ITL-1068; moved past 0.4.0rc1 on November 17, 2026): their extension names are listed in `provisional` of `contexts/logical_types.json`, and using one issues `ProvisionalHashWarning` once per type - per process. A new library value type must be added to that list. The list never enters a + per process. A new library value type must be added to that list. Its golden entries live in the + provisional golden files (ITL-1324), and so do those of a user class with a field of such a + type, whose identity embeds the type's identifier. The list never enters a hash, identifier or stored path. ## User classes: exact and structural @@ -509,9 +511,16 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current the release step for every version. A withdrawn version is never released again. - Provisional operators are outside the freeze (developer, November 18, 2026, ITL-1266): `orcapod.operators.PROVISIONAL_OPERATORS` (`core/operators/provisional.py`) is the one - list (name to the issue deciding its identity; today `PolarsFilter`), and each listed class - sets `PROVISIONAL = True` (a test checks they agree). Building one issues - `ProvisionalHashWarning` once per operator per process. A golden case that depends on one + list (name to the issue deciding its identity), and each listed class sets + `PROVISIONAL = True` (a test checks they agree, and that every exported operator is either + provisional or frozen). The list (developer, November 19, 2026, ITL-1279: "anything whose + identity choice isn't obvious and feels solid should be put into provisional first"): + `PolarsFilter`, `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`, `MapTags`, `MapColumns`, + `Pick`, `Index`, `Batch`. Frozen: `Join`, `SemiJoin`, `MapData`, the Select/Drop column + operators, `DropNulls`. An operator joins the group only while no release has frozen its + values, and leaves it when its identity is decided (before or at a release), never the other + way after a release. Building one (directly, through a stream method, or by loading a saved + job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a case that builds an undeclared one); its entries live in `data//provisional/.json`, listed in `golden.provisional` of the manifest, @@ -520,7 +529,12 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current context. `generate_golden_hashes.py --relocate` moves entries, values unchanged, between frozen and provisional files; an operator leaving the group has its entries relocated into a frozen file before the release step. Never put a value that depends on a provisional - operator in a frozen file. + operator in a frozen file. The provisional library value types are outside the freeze the + same way (ITL-1324): a case declares one by extension name + (`provisional=("orcapod.numpy.ndarray",)`), and each use of one is noted for the refusal. + The refusal sees a direct use only: a user class with a field of such a type embeds its + identifier in an identity built once and cached, so golden items are split by + `cases.provisional_types_of` (checked against every fixture class's identity record). - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/changelog.d/ITL-1279.md b/changelog.d/ITL-1279.md new file mode 100644 index 000000000..e95a0f65b --- /dev/null +++ b/changelog.d/ITL-1279.md @@ -0,0 +1,16 @@ +### Changed + +- **Nine more operators are provisional:** `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`, + `MapTags`, `MapColumns`, `Pick`, `Index` and `Batch`, beside `PolarsFilter` + (`orcapod.operators.PROVISIONAL_OPERATORS`). Their identities are not frozen with data + context v1: a later release may change one, and then the steps built on it compute their + results again instead of reusing them (nothing stored is lost or wrong). Building one, + directly, through a stream method (`stream.group_by`, `stream.add_tags`, ...) or by + loading a saved job, issues `ProvisionalHashWarning` once per operator per process; to + silence it, `warnings.filterwarnings("ignore", category=orcapod.errors.ProvisionalHashWarning)`. + Every other operator is frozen: `Join`, `SemiJoin`, `MapData`, the column selections and + `DropNulls`. No operator's identity or output changes. (ITL-1279) +- **The golden values of the provisional library value types are no longer frozen with v1:** + NumPy arrays, torch tensors and pandas and Polars frames and series, and a user class with a + field of one of them, whose identity embeds that type's identifier (ITL-1324). No value + changes. diff --git a/docs/concepts/arrays.md b/docs/concepts/arrays.md index 0ec84815a..57f80ae2a 100644 --- a/docs/concepts/arrays.md +++ b/docs/concepts/arrays.md @@ -54,6 +54,11 @@ process, on whichever use comes first: a value hashed, a source column of the ty pod with a parameter or output of the type, or stored results of the type read back. It names the type, for example `orcapod.numpy.ndarray`. +A user class with a field of one of these types is provisional too: its identity holds the +identifier of each field's type, so if the audit changes the array type's identifier, the +class's own identity, and every hash it feeds, changes with it. Registering such a class, or +storing its values, issues the same warning (for the field's type). + In practice nothing needs to change. Use these types as described on this page. If the audit changes how one of them is hashed, a result Orcapod computed earlier from such a value gets a different identity, so the release that carries the change computes it again instead of reusing diff --git a/docs/concepts/operators.md b/docs/concepts/operators.md index 05a2072aa..8202c809b 100644 --- a/docs/concepts/operators.md +++ b/docs/concepts/operators.md @@ -836,14 +836,36 @@ The provisional operators are listed in one place: from orcapod.operators import PROVISIONAL_OPERATORS print(sorted(PROVISIONAL_OPERATORS)) -# ['PolarsFilter'] -``` - -Each name maps to the issue that decides the operator's identity (`PolarsFilter`: whether -the order of its predicates belongs to it). Building a provisional operator, directly or -through a stream method such as `polars_filter`, issues `orcapod.errors.ProvisionalHashWarning` -once per operator per process. To silence it once you have taken note, filter its class after -importing Orcapod: +# ['AddTags', 'Batch', 'GroupBy', 'Index', 'MapColumns', 'MapTags', 'MergeJoin', 'Pick', 'PolarsFilter', 'TagBy'] +``` + +They are the operators whose identity choice is not yet obvious and solid (developer, +November 19, 2026). Each name maps to the issue that decides its identity or output: + +| Operator | What is still open | +|---|---| +| `GroupBy`, `Batch` | their output for a data-tag and its data column (ITL-1017) | +| `MergeJoin` | its rules for data-tags (ITL-1018); it became ordered in this release | +| `MapTags` | its rename rules for data-tags (ITL-1018) | +| `MapColumns` | its behaviour with data-tags (ITL-1022) | +| `Pick`, `Index` | the policy for a miss, which changes the output (ITL-439) | +| `PolarsFilter` | whether the order of its predicates belongs to its identity (ITL-1247) | +| `TagBy`, `AddTags` | days old, their identities just changed (ITL-1279) | + +Every other operator is frozen with data context v1: `Join`, `SemiJoin`, `MapData`, the +column selections (`SelectTagColumns`, `SelectDataColumns`, `DropTagColumns`, +`DropDataColumns`, `SelectColumns`, `DropColumns`) and `DropNulls`. + +What you get with a provisional operator: the same results as with any other operator, a +warning, and, should a later release change the operator's identity, a recomputation of its +steps (and of every step downstream) instead of reuse; nothing stored is lost or wrong. +Building one, directly, through a stream method such as `group_by` or `polars_filter`, or by +loading a saved job that holds one, issues `orcapod.errors.ProvisionalHashWarning` once per +operator per process. It reads, for example, `GroupBy is provisional: its identity is not +frozen with data context v1 and may change in a later release. ...` and points to this +section. A notebook shows it once, below the first cell that builds the operator; it is a +warning, not an error, and the cell runs. To silence it once you have taken note, filter its +class after importing Orcapod: ```python import warnings @@ -853,9 +875,11 @@ from orcapod.errors import ProvisionalHashWarning warnings.filterwarnings("ignore", category=ProvisionalHashWarning) ``` -An operator leaves the group at a release: from that release on its identity is frozen like -every other operator's. Its golden values then move into the frozen golden files (see -[Golden hashes](../reference/golden-hashes.md#provisional-files)). +An operator leaves the group (its identity is decided) at a release, or before one: from then +on its identity is frozen like every other operator's, and its golden values move into the +frozen golden files (see [Golden hashes](../reference/golden-hashes.md#provisional-files)). An +operator can join the group only while no release has frozen its values: a frozen identity +never becomes provisional again. ## Arrow types of operator outputs diff --git a/docs/dev/scripts/itl_1279/measure_relocation.py b/docs/dev/scripts/itl_1279/measure_relocation.py new file mode 100644 index 000000000..b47e41dc4 --- /dev/null +++ b/docs/dev/scripts/itl_1279/measure_relocation.py @@ -0,0 +1,197 @@ +"""ITL-1279 and ITL-1324: which golden entries the relocation would move (measurement only). + +usage: uv run python docs/dev/scripts/itl_1279/measure_relocation.py [mixed] + +``mixed``: per entry, for the cases that mix frozen and provisional entries. + +In this process only, the approved provisional operators are marked provisional +(``PROVISIONAL = True`` and ``PROVISIONAL_OPERATORS``), and the use of a provisional +library value type (``provisional`` of ``contexts/logical_types.json``) is noted by its +extension name, as the change will do. Every golden case of every available group then +runs inside ``recording_provisional_uses``. For each case that uses a provisional feature +the script prints: the features, the number of entries, the golden file(s) pinning them +(frozen or provisional), and whether the case already declares them. Totals at the end. +No golden file is read for writing and nothing is written. +""" + +from __future__ import annotations + +import importlib +import json +import sys +from collections import Counter, defaultdict +from pathlib import Path +from typing import Any + +ROOT = Path(__file__).resolve().parents[4] +sys.path.insert(0, str(ROOT / "tests" / "test_hashing" / "golden")) + +APPROVED = { + "GroupBy": "group_by", + "TagBy": "tag_by", + "AddTags": "add_tags", + "MergeJoin": "merge_join", + "MapTags": "mappers", + "MapColumns": "mappers", + "Pick": "pick", + "Index": "index", + "Batch": "batch", +} + + +def install() -> None: + from orcapod.core.operators import provisional as prov + from orcapod.utils.provisional import note_provisional_use + + names = dict(prov.PROVISIONAL_OPERATORS) + for name, module in APPROVED.items(): + cls = getattr(importlib.import_module(f"orcapod.core.operators.{module}"), name) + cls.PROVISIONAL = True + names.setdefault(name, "measuring") + prov.PROVISIONAL_OPERATORS = names # pyright: ignore[reportAttributeAccessIssue] + + import orcapod.hashing.semantic_hashing.type_handler_registry as handlers + import orcapod.logical_types.registry as registry + from orcapod.logical_types import provisional as lt_prov + + original = lt_prov.warn_provisional + + def noted(extension_name: str) -> None: + note_provisional_use(extension_name) + original(extension_name) + + lt_prov.warn_provisional = noted + handlers.warn_provisional = noted # pyright: ignore[reportAttributeAccessIssue] + registry.warn_provisional = noted # pyright: ignore[reportAttributeAccessIssue] + + +def pinned_files() -> dict[str, dict[str, str]]: + """group -> entry -> the golden file (relative) that pins it.""" + folder = ROOT / "tests" / "test_hashing" / "golden" / "data" / "v1" + where: dict[str, dict[str, str]] = defaultdict(dict) + for path in sorted(folder.rglob("*.json")): + relative = path.relative_to(folder).as_posix() + group = path.stem.split("-")[0] + for entry in json.loads(path.read_text()): + where[group][entry] = relative + return where + + +def main() -> None: + import warnings + + warnings.simplefilter("ignore") + install() + import cases # pyright: ignore[reportMissingImports] + from orcapod.utils.provisional import recording_provisional_uses + + where = pinned_files() + totals: Counter[str] = Counter() + by_feature: Counter[str] = Counter() + for group in cases.available_groups(): + for name, fn, declared in cases._CASES[group]: # pyright: ignore[reportPrivateUsage] + with recording_provisional_uses() as used: + values = fn() + used = set(used) + entries = [f"{name}.{k}" if k else name for k in values] + files = Counter(where[group].get(e, "UNPINNED") for e in entries) + if not used: + frozen_but_declared = bool(declared) + if frozen_but_declared: + print(f"{group}:{name} declares {declared} but uses none") + continue + moving = sum( + n for f, n in files.items() if not f.startswith("provisional/") + ) + totals["cases"] += 1 + totals["entries"] += len(entries) + totals["moving"] += moving + for feature in used: + by_feature[feature] += len(entries) + print( + f"{group}:{name}: uses {sorted(used)}; {len(entries)} entries; " + f"files {dict(files)}; declared {list(declared)}; moving {moving}" + ) + print() + print("totals:", dict(totals)) + print( + "entries per feature (a case counts for each feature it uses):", + dict(by_feature), + ) + + +if __name__ == "__main__" and sys.argv[1:] != ["mixed"]: + main() + + +def mixed() -> None: + """Per entry, for the cases that mix frozen and provisional entries: which entries + depend on a provisional feature (each item computed alone, while recording).""" + import uuid + import warnings + + import numpy as np + import pandas as pd + import pyarrow as pa + + warnings.simplefilter("ignore") + install() + import cases # pyright: ignore[reportMissingImports] + import orcapod as op + from orcapod.types import Schema + from orcapod.utils.provisional import recording_provisional_uses + + ctx = cases._ctx() # pyright: ignore[reportPrivateUsage] + cases.register_logical_classes() + + def attribute(label: str, items: dict[str, Any], compute: Any) -> None: + moving, staying = [], [] + for key, item in items.items(): + with recording_provisional_uses() as used: + compute(item) + (moving if used else staying).append(key) + print(f"{label}: {len(moving)} provisional entries {sorted(moving)}") + print(f"{label}: {len(staying)} frozen entries") + + hasher = ctx.semantic_hasher + attribute( + "semantic:value (1 entry per key)", cases.SEMANTIC_VALUES, hasher.hash_object + ) + attribute( + "semantic:type (1 entry per key)", + cases._semantic_types(), # pyright: ignore[reportPrivateUsage] + hasher.hash_object, + ) + + def single_field(tp: Any) -> None: + ctx.type_converter.python_type_to_arrow_type(tp) + hasher.hash_object(Schema({"c": tp})) + + attribute( + "schema:single_field (2 entries per key)", + cases._semantic_types(), # pyright: ignore[reportPrivateUsage] + single_field, + ) + types = { + "uuid": uuid.UUID, + "file": op.File, + "directory": op.Directory, + "ndarray": np.ndarray, + "dataframe": pd.DataFrame, + "series": pd.Series, + "list_of_file": list[op.File], + "set_of_uuid": set[uuid.UUID], + } + + def extension(python_type: Any) -> None: + for rows in (0, 2): + arrow_type = ctx.type_converter.python_type_to_arrow_type(python_type) + storage = pa.array([None] * rows, arrow_type.storage_type) + column = pa.ExtensionArray.from_storage(arrow_type, storage) + ctx.arrow_hasher.hash_table(pa.table({"c": column})) + + attribute("arrow:extension_no_values (2 entries per key)", types, extension) + + +if __name__ == "__main__" and sys.argv[1:] == ["mixed"]: + mixed() diff --git a/docs/dev/scripts/itl_1279/relocation_proof.py b/docs/dev/scripts/itl_1279/relocation_proof.py new file mode 100644 index 000000000..ba578f8a8 --- /dev/null +++ b/docs/dev/scripts/itl_1279/relocation_proof.py @@ -0,0 +1,88 @@ +"""ITL-1279 and ITL-1324: prove a relocation moved entries between files and changed none. + +usage: uv run --no-project python docs/dev/scripts/itl_1279/relocation_proof.py \\ + [--root ROOT] [--ref origin/main] + +Reads every golden file (frozen and provisional) of data context v1 under ``ROOT`` +(default: this repository) and the same folder at git ``--ref`` of this repository, and +compares the union of entries: names and values must be identical. It prints, per entry +that changed its file, the old and the new file, counted by (case, old file, new file). +Writes nothing. +""" + +from __future__ import annotations + +import argparse +import json +import subprocess +from collections import Counter +from pathlib import Path +from typing import Any + +REPO = Path(__file__).resolve().parents[4] +FOLDER = Path("tests/test_hashing/golden/data/v1") + + +def entries_at(root: Path | None, ref: str | None) -> dict[str, tuple[str, Any]]: + """group:entry -> (file, value), from the working files of ``root`` or a git ref.""" + if ref is not None: + listing = subprocess.run( + ["git", "ls-tree", "-r", "--name-only", ref, f"{FOLDER}/"], + cwd=REPO, + capture_output=True, + text=True, + check=True, + ).stdout.split() + files = { + Path(f).relative_to(FOLDER).as_posix(): subprocess.run( + ["git", "show", f"{ref}:{f}"], + cwd=REPO, + capture_output=True, + text=True, + check=True, + ).stdout + for f in listing + if f.endswith(".json") + } + else: + assert root is not None + base = root / FOLDER + files = { + p.relative_to(base).as_posix(): p.read_text() for p in base.rglob("*.json") + } + out: dict[str, tuple[str, Any]] = {} + for name, text in files.items(): + group = Path(name).stem.split("-")[0] + for entry, value in json.loads(text).items(): + key = f"{group}:{entry}" + assert key not in out, f"{key} pinned twice" + out[key] = (name, value) + return out + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--root", type=Path, default=REPO) + parser.add_argument("--ref", default="origin/main") + args = parser.parse_args() + before = entries_at(None, args.ref) + after = entries_at(args.root, None) + removed = sorted(set(before) - set(after)) + added = sorted(set(after) - set(before)) + changed = sorted(k for k in set(before) & set(after) if before[k][1] != after[k][1]) + moved: Counter[tuple[str, str, str]] = Counter() + for key in set(before) & set(after): + if before[key][0] != after[key][0]: + case = key.split(".", 1)[0] + moved[(case, before[key][0], after[key][0])] += 1 + print(f"entries before: {len(before)}; after: {len(after)}") + print(f"changed: {len(changed)}; removed: {len(removed)}; added: {len(added)}") + print(f"moved between files: {sum(moved.values())}") + for (case, old, new), count in sorted(moved.items()): + print(f" {count:3} {case}: {old} -> {new}") + if changed or removed or added: + raise SystemExit("a value or a name differs: the relocation is not a pure move") + + +if __name__ == "__main__": + main() diff --git a/docs/reference/golden-hashes.md b/docs/reference/golden-hashes.md index 76d51388a..58780abaf 100644 --- a/docs/reference/golden-hashes.md +++ b/docs/reference/golden-hashes.md @@ -24,15 +24,17 @@ wanted on purpose starts a new data context version. It never edits a released v entries that move, each explained. 0.4.0 freezes `v1`. See [Withdrawing a release](#withdrawing-a-release). -!!! note "Provisional operators are outside the freeze" - A provisional operator (`orcapod.operators.PROVISIONAL_OPERATORS`, today only - `PolarsFilter`) has an identity that no release freezes yet (ITL-1266). The golden values - of every case that depends on one, its own hashes and those of every step downstream of - it, are in the provisional files, `data/v1/provisional/.json`. They are computed - and checked on every run like every other value, but no release lists them: they can - change in a later release without a new data context, with the developer's approval of - the exact list. So the promise on this page holds for a pipeline only when it contains - no provisional operator. See [Provisional files](#provisional-files). +!!! note "Provisional operators and library value types are outside the freeze" + A provisional operator (`orcapod.operators.PROVISIONAL_OPERATORS`; ITL-1266, ITL-1279) + has an identity that no release freezes yet, and so has a provisional library value type + (`provisional` of `contexts/logical_types.json`: NumPy arrays, torch tensors, pandas and + Polars frames and series; ITL-1324). The golden values of every case that depends on one, + its own hashes and those of every step downstream of it, are in the provisional files, + `data/v1/provisional/.json`. They are computed and checked on every run like every + other value, but no release lists them: they can change in a later release without a new + data context, with the developer's approval of the exact list. So the promise on this page + holds for a pipeline only when it contains neither. See + [Provisional files](#provisional-files). ## The pieces at a glance @@ -150,22 +152,38 @@ tests/test_hashing/golden/data/ ### Provisional files `tests/test_hashing/golden/data/v1/provisional/.json` holds the values of the cases -that depend on a provisional operator (ITL-1266), one file per group and no counter: such a -file is never frozen, and the generator rewrites it in place. - -- **Which entries.** A case declares the provisional operators it depends on: - `@case("pipeline", "polars_filter", provisional=("PolarsFilter",))`. The generator runs - every case while Orcapod records which provisional operators it builds - (`orcapod.utils.provisional.recording_provisional_uses`), and refuses a case that builds - one without declaring it, or that declares a name `PROVISIONAL_OPERATORS` does not hold. - The golden test checks that every entry is in the kind of file its case declares. So a - value that depends on a provisional operator cannot be pinned in a frozen file: neither - through a stream method that builds it (`stream.polars_filter`) nor in a step downstream - of it. -- **Today:** the `pipeline` cases `polars_filter`, `polars_filter_expr` and - `polars_filter_expr_job`, and the `semantic` case `polars_expr`: the `polars_expr_v1` - hashes, which only `PolarsFilter`'s identity feeds in the library. The 86 entries moved - out of `pipeline-01.json` and `semantic-01.json`, values unchanged, before `v1` was frozen. +that depend on a provisional operator (ITL-1266, ITL-1279) or a provisional library value type +(ITL-1324), one file per group and no counter: such a file is never frozen, and the generator +rewrites it in place. + +- **Which entries.** A case declares the provisional features it depends on, operators by + class name and library value types by extension name: + `@case("pipeline", "group_by", provisional=("GroupBy",))`, + `@case("datagram", "ndarray", provisional=("orcapod.numpy.ndarray",))`. The generator runs + every case while Orcapod records which provisional features it uses + (`orcapod.utils.provisional.recording_provisional_uses`: an operator when it is built, a + library value type when it is resolved), and refuses a case that uses one without + declaring it, or that declares a name that is not provisional. The golden test checks + that every entry is in the kind of file its case declares. So a value that depends + directly on a provisional feature cannot be pinned in a frozen file: neither through a + stream method that builds an operator (`stream.group_by`) nor in a step downstream of it. +- **A dependence the record cannot see.** A user class with a field of a provisional library + type (the fixture `GoldenWithArray`) embeds that type's identifier in its own identity, but + the identity is built once, when the class is registered, and cached: a later use of the + class resolves no type and records nothing. So a case whose items mix such values with + others is split by a predicate on the items' types (`cases.provisional_types_of`, which + reads field types, generic arguments and container elements), the fixtures are registered + before any case records its uses, and `test_golden_provisional_types.py` checks the + predicate against every fixture class's identity record. +- **Split cases.** A case whose items are partly provisional is registered twice under its + one name, the provisional part declared, so every entry keeps its name: `semantic:value`, + `semantic:type`, `schema:single_field`, `arrow:extension_no_values` and + `pipeline:join_key_nullability` (its `merge_join.*` entries). +- **Today:** 443 entries. The `PolarsFilter` cases (`polars_filter`, `polars_filter_expr`, + `polars_filter_expr_job` and the `semantic` case `polars_expr`, 86 entries) moved out of + the frozen files with ITL-1266; the cases of the other provisional operators (229 entries) + and of the library value types (128 entries, with the 12 of `GoldenWithArray`) moved with + ITL-1279 and ITL-1324. Every move was values unchanged, before `v1` was frozen. - **What holds.** Every provisional value is computed and compared on every CI run, so a change nobody intended fails. An intended change needs the developer's approval of the exact list of entries that move, each explained (`--remove`, then `--add`), but no new diff --git a/src/orcapod/core/operators/add_tags.py b/src/orcapod/core/operators/add_tags.py index a06f74215..ea377e9e0 100644 --- a/src/orcapod/core/operators/add_tags.py +++ b/src/orcapod/core/operators/add_tags.py @@ -119,6 +119,9 @@ class AddTags(UnaryOperator): ``::`` separator). """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags pass through as they are; the new tags are plain (ITL-1023). DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/batch.py b/src/orcapod/core/operators/batch.py index 5d9a2f437..16960108d 100644 --- a/src/orcapod/core/operators/batch.py +++ b/src/orcapod/core/operators/batch.py @@ -50,6 +50,9 @@ class Batch(UnaryOperator): drop_partial_batch: Drop a last batch with fewer than ``batch_size`` rows. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled (ITL-1017). DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/group_by.py b/src/orcapod/core/operators/group_by.py index 5d51fd08b..07f7f9e5e 100644 --- a/src/orcapod/core/operators/group_by.py +++ b/src/orcapod/core/operators/group_by.py @@ -319,6 +319,9 @@ class GroupBy(UnaryOperator): NotImplementedError: If ``member_order`` is a function. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled. DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/index.py b/src/orcapod/core/operators/index.py index 33d48fdaa..c8fab2d85 100644 --- a/src/orcapod/core/operators/index.py +++ b/src/orcapod/core/operators/index.py @@ -51,6 +51,9 @@ class Index(UnaryOperator): See ITL-439. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled. DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/mappers.py b/src/orcapod/core/operators/mappers.py index 934510eff..57b98a2c8 100644 --- a/src/orcapod/core/operators/mappers.py +++ b/src/orcapod/core/operators/mappers.py @@ -334,6 +334,9 @@ class MapTags(UnaryOperator): tag_only: Rename data-tags in the tag role only. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled. DATA_TAGS_ISSUE: ClassVar[str | None] = None @@ -619,6 +622,9 @@ class MapColumns(UnaryOperator): or (with ``drop_unmapped``) no data column would remain. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + def __init__( self, name_map: Mapping[str, str], diff --git a/src/orcapod/core/operators/merge_join.py b/src/orcapod/core/operators/merge_join.py index 42d34b956..4477936fe 100644 --- a/src/orcapod/core/operators/merge_join.py +++ b/src/orcapod/core/operators/merge_join.py @@ -157,6 +157,9 @@ class MergeJoin(BinaryOperator): merged into a list in argument order, as for plain inputs. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023) are handled (ITL-1194). DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/pick.py b/src/orcapod/core/operators/pick.py index 4d032b3dc..e92138519 100644 --- a/src/orcapod/core/operators/pick.py +++ b/src/orcapod/core/operators/pick.py @@ -53,6 +53,9 @@ class Pick(UnaryOperator): functional output semantics. See ITL-439. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled. DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/core/operators/provisional.py b/src/orcapod/core/operators/provisional.py index 67cf136b3..6bb738ce2 100644 --- a/src/orcapod/core/operators/provisional.py +++ b/src/orcapod/core/operators/provisional.py @@ -28,9 +28,32 @@ PROVISIONAL_OPERATORS: Mapping[str, str] = MappingProxyType( { + # Developer, November 19, 2026 (ITL-1279): "anything whose identity choice isn't + # obvious and feels solid should be put into provisional first". Each names the + # issue that decides its identity or output; the reasons per operator are in + # docs/dev/specs/itl-1271-order-invariance-audit.md. # Whether the order of its predicates is part of its identity (ITL-1247), and # whether a general Filter over a Condition supersedes it (ITL-1265). "PolarsFilter": "ITL-1247", + # Its output for a data-tag and its data column (ITL-1017); a mode keeping the + # non-key tags (ITL-1071). + "GroupBy": "ITL-1017", + # Its output for a data-tag and its data column (ITL-1017). + "Batch": "ITL-1017", + # Its rules for data-tags (ITL-1018); it became ordered in ITL-1281. + "MergeJoin": "ITL-1018", + # Its rename rules for data-tags (ITL-1018); arguments under two weeks old. + "MapTags": "ITL-1018", + # Its behaviour with data-tags (ITL-1022); two days old. + "MapColumns": "ITL-1022", + # The policy for a miss changes its output (ITL-439). + "Pick": "ITL-439", + # As Pick (ITL-439), plus a stored source-info token known wrong (ITL-866). + "Index": "ITL-439", + # Days old, its identity just changed (ITL-1226); no issue decides more yet. + "TagBy": "ITL-1279", + # Days old, its identity just changed (ITL-1269); a function form is future. + "AddTags": "ITL-1279", } ) """The provisional operators: class name to the issue that decides its identity.""" diff --git a/src/orcapod/core/operators/tag_by.py b/src/orcapod/core/operators/tag_by.py index 9d50365b3..8f4e54f63 100644 --- a/src/orcapod/core/operators/tag_by.py +++ b/src/orcapod/core/operators/tag_by.py @@ -73,6 +73,9 @@ class TagBy(UnaryOperator): column name, or one holding ``::``. """ + # Provisional: its identity is not frozen with data context v1 (ITL-1279). + PROVISIONAL: ClassVar[bool] = True + # Data-tags (ITL-1023): handled; this operator makes them. DATA_TAGS_ISSUE: ClassVar[str | None] = None diff --git a/src/orcapod/logical_types/provisional.py b/src/orcapod/logical_types/provisional.py index cb39c1e29..02d2bd6f2 100644 --- a/src/orcapod/logical_types/provisional.py +++ b/src/orcapod/logical_types/provisional.py @@ -3,8 +3,10 @@ The library value types are declared provisional in the ``provisional`` list of ``orcapod/contexts/logical_types.json``; the logical type registry and the value handler registry of a data context hold that list and call ``warn_provisional`` -when they resolve a declared type. This module only keeps the once-per-type -bookkeeping, which is process-wide. +when they resolve a declared type. This module keeps the once-per-type bookkeeping, which +is process-wide, and notes every use by the type's extension name +(``utils/provisional.note_provisional_use``, ITL-1324), as a provisional operator does: the +golden hash tool refuses a frozen case that uses one without declaring it. """ from __future__ import annotations @@ -13,6 +15,7 @@ import warnings from orcapod.errors import ProvisionalHashWarning +from orcapod.utils.provisional import note_provisional_use from orcapod.utils.warning_utils import outside_orcapod_stacklevel _lock = threading.RLock() @@ -20,15 +23,17 @@ def warn_provisional(extension_name: str) -> None: - """Issue ``ProvisionalHashWarning`` for a type, once per process. + """Note a use of a provisional type and warn, once per type per process. - The type is recorded only after ``warnings.warn`` returns, so under an error + The use is noted every time (``note_provisional_use``), by the extension name. The + type is recorded as warned only after ``warnings.warn`` returns, so under an error filter every use raises. The warning is attributed to the first frame outside Orcapod, the code that used the type. Args: extension_name: The Arrow extension name of a type declared provisional. """ + note_provisional_use(extension_name) if extension_name in _issued: return with _lock: diff --git a/tests/test_core/operators/test_provisional_operators.py b/tests/test_core/operators/test_provisional_operators.py index 4d3abba9a..98a9a89dd 100644 --- a/tests/test_core/operators/test_provisional_operators.py +++ b/tests/test_core/operators/test_provisional_operators.py @@ -110,11 +110,45 @@ def test_the_list_and_the_markers_agree() -> None: assert provisional_operator_name(cls) == expected, name -def test_polars_filter_is_provisional_and_names_its_issue() -> None: - assert dict(PROVISIONAL_OPERATORS) == {"PolarsFilter": "ITL-1247"} +# The developer-approved list (2026-11-19, ITL-1279), each with the issue that decides +# its identity or output. +APPROVED = { + "PolarsFilter": "ITL-1247", + "GroupBy": "ITL-1017", + "Batch": "ITL-1017", + "MergeJoin": "ITL-1018", + "MapTags": "ITL-1018", + "MapColumns": "ITL-1022", + "Pick": "ITL-439", + "Index": "ITL-439", + "TagBy": "ITL-1279", + "AddTags": "ITL-1279", +} +# The operators frozen with data context v1 (ITL-1279). +FROZEN = { + "Join", + "SemiJoin", + "MapData", + "SelectTagColumns", + "SelectDataColumns", + "DropTagColumns", + "DropDataColumns", + "SelectColumns", + "DropColumns", + "DropNulls", +} + + +def test_the_list_is_the_approved_list_with_its_issues() -> None: + assert dict(PROVISIONAL_OPERATORS) == APPROVED assert "PROVISIONAL_OPERATORS" in operators.__all__ +def test_every_exported_operator_is_provisional_or_frozen() -> None: + """No exported operator is left undecided: a new one must join a list.""" + assert set(_exported_operators()) == set(APPROVED) | FROZEN + + def test_a_subclass_is_provisional_as_its_nearest_marked_base() -> None: assert provisional_operator_name(_ProvisionalA) == "_ProvisionalA" assert provisional_operator_name(_ProvisionalB) == "_ProvisionalB" @@ -274,3 +308,142 @@ def test_recording_changes_no_warning() -> None: with recording_provisional_uses(): _ = PolarsFilter() assert len(_provisional_warnings(caught)) == 1 + + +# --------------------------------------------------------------------------- +# Every approved operator warns once per process, through every way it is built +# (ITL-1279) +# --------------------------------------------------------------------------- + + +def _non_null(columns: dict[str, Any]) -> pa.Table: + """A table of ``columns`` with every field non-nullable.""" + table = pa.table(columns) + return table.cast(pa.schema(f.with_nullable(False) for f in table.schema)) + + +def _lists() -> Any: + """Two tags, a list column and a mapping column, for ``Pick`` and ``Index``.""" + from orcapod.sources import DictSource + + return DictSource( + data=[ + {"subject": "s1", "session": 1, "values": [1, 2, 3], "meta": {"k": 10}}, + {"subject": "s2", "session": 2, "values": [4, 5], "meta": {"k": 20}}, + ], + tag_columns=["subject", "session"], + tag_only_columns=True, + ) + + +def _non_null_stream() -> ArrowTableSource: + """``_stream``'s columns, none nullable (a tag needs a value in every row).""" + return ArrowTableSource( + _non_null( + { + "subject": ["s1", "s2", "s3"], + "session": [1, 2, 1], + "age": [2, 4, 6], + "weight": [20.5, 22.25, 19.0], + } + ), + tag_columns=["subject", "session"], + tag_only_columns=True, + ) + + +def _other() -> ArrowTableSource: + """A second input for ``MergeJoin``: the same tags, colliding ``age``.""" + table = pa.table({"subject": ["s1", "s2"], "session": [1, 2], "age": [7, 8]}) + return ArrowTableSource( + table, tag_columns=["subject", "session"], tag_only_columns=True + ) + + +# Each approved operator built through the stream method a user calls (MergeJoin has +# none: it is called on two inputs). +BY_STREAM_METHOD: dict[str, Any] = { + "GroupBy": lambda: _stream().group_by("subject"), + "Batch": lambda: _stream().batch(2), + "TagBy": lambda: _non_null_stream().tag_by("age"), + "AddTags": lambda: _stream().add_tags(cohort="A", run=3), + "MapTags": lambda: _stream().map_tags({"subject": "animal"}), + "MapColumns": lambda: _stream().map_columns({"subject": "animal", "age": "years"}), + "Pick": lambda: _lists().pick("meta", "k"), + "Index": lambda: _lists().index("values", 0), + "MergeJoin": lambda: operators.MergeJoin()(_stream(), _other()), +} + + +@pytest.mark.parametrize("name", sorted(BY_STREAM_METHOD)) +def test_each_approved_operator_warns_once_through_its_stream_method(name: str) -> None: + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + for _ in range(2): + _ = BY_STREAM_METHOD[name]().as_table() + messages = _provisional_warnings(caught) + assert len(messages) == 1, messages + assert messages[0].startswith(f"{name} is provisional:") + + +NOT_REBUILT_FROM_CONFIG = pytest.mark.xfail( + strict=True, + raises=TypeError, + reason="Pick and Index have no to_config and are not in the operator registry of " + + "pipeline/serialization.py: a saved job loads such a node read-only and never " + + "rebuilds the operator (pre-existing; found by ITL-1279, issue to be filed)", +) + + +@pytest.mark.parametrize( + "name", + [ + pytest.param(n, marks=NOT_REBUILT_FROM_CONFIG) if n in ("Index", "Pick") else n + for n in sorted(BY_STREAM_METHOD) + ], +) +def test_each_approved_operator_warns_when_rebuilt_from_its_config(name: str) -> None: + """A saved and loaded job rebuilds its operators from their configs.""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + stream = BY_STREAM_METHOD[name]() + operator = stream.producer # pyright: ignore[reportAttributeAccessIssue] + reset_provisional_operator_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + rebuilt = type(operator).from_config(operator.to_config()) + assert type(rebuilt) is type(operator) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [name] + + +@pytest.mark.parametrize( + "order", [("GroupBy", "AddTags", "Batch"), ("AddTags", "GroupBy", "Batch")] +) +def test_a_loaded_job_warns_once_for_each_provisional_operator_it_holds( + tmp_path: Any, order: tuple[str, ...] +) -> None: + """Three provisional operators in a job, in two orders: loading the saved job warns + once for each, in a new process (the bookkeeping reset), and never for a frozen one.""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + steps = { + "GroupBy": lambda s: s.group_by("subject"), + "AddTags": lambda s: s.add_tags(cohort="A"), + "Batch": lambda s: s.batch(2), + } + job = PipelineJob(name="provisional", database=InMemoryArrowDatabase()) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + with job: + stream: Any = _stream().select_data_columns(["age"]) + for name in order: + stream = steps[name](stream) + path = tmp_path / "job.json" + job.save(path) + reset_provisional_operator_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + _ = PipelineJob.load(path, database=InMemoryArrowDatabase()) + names = [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] + assert sorted(names) == sorted(order) diff --git a/tests/test_hashing/golden/README.md b/tests/test_hashing/golden/README.md index ff2876454..e7fc4bc8c 100644 --- a/tests/test_hashing/golden/README.md +++ b/tests/test_hashing/golden/README.md @@ -14,9 +14,15 @@ In short: - A file listed by a released revision never changes. New values go into new files, in any release. A change to a released value needs a new data context version. - `data//provisional/.json` holds the values of the cases that depend on a - provisional operator (`orcapod.operators.PROVISIONAL_OPERATORS`; ITL-1266). A case - declares them (`@case(..., provisional=("PolarsFilter",))`); a case that builds one without - declaring it is refused. The manifest lists these files in `golden.provisional`, outside + provisional operator (`orcapod.operators.PROVISIONAL_OPERATORS`; ITL-1266, ITL-1279) or a + provisional library value type (`provisional` of `contexts/logical_types.json`, by + extension name; ITL-1324). A case declares them (`@case(..., provisional=("GroupBy",))`, + `provisional=("orcapod.numpy.ndarray",)`); a case that uses one without declaring it is + refused. The refusal sees a DIRECT use (an operator built, a library type resolved); it + cannot see a dependence behind a user class's identity, built once at registration and + cached (a class with an `np.ndarray` field). Such items are split out by + `cases.provisional_types_of`, which `test_golden_provisional_types.py` checks against every + fixture class's identity record. The manifest lists these files in `golden.provisional`, outside the history: no release freezes them. `--relocate` moves entries, values unchanged, between the frozen and the provisional files as their cases declare. - Data context v1 is open until 0.4.0: 0.3.0 was withdrawn on 2026-11-17 (ITL-1255). Its diff --git a/tests/test_hashing/golden/cases.py b/tests/test_hashing/golden/cases.py index c97df0e3a..b0e3984f9 100644 --- a/tests/test_hashing/golden/cases.py +++ b/tests/test_hashing/golden/cases.py @@ -106,10 +106,105 @@ def register(fn: CaseFn) -> CaseFn: def declarable_provisional_names() -> frozenset[str]: - """The names a case may declare provisional: the provisional operators (ITL-1266).""" + """The names a case may declare provisional: the provisional operators (ITL-1266) + and the provisional library value types, by extension name (the ``provisional`` + list of ``contexts/logical_types.json``; ITL-1324).""" + import importlib.resources + from orcapod.core.operators.provisional import PROVISIONAL_OPERATORS - return frozenset(PROVISIONAL_OPERATORS) + registration = json.loads( + importlib.resources.files("orcapod.contexts") + .joinpath("logical_types.json") + .read_text() + ) + return frozenset(PROVISIONAL_OPERATORS) | frozenset( + registration.get("provisional", []) + ) + + +# The provisional library value types, by the name a case declares (ITL-1324). +NUMPY_NDARRAY = "orcapod.numpy.ndarray" +PANDAS_DATAFRAME = "orcapod.pandas.dataframe" +PANDAS_SERIES = "orcapod.pandas.series" +POLARS_DATAFRAME = "orcapod.polars.dataframe" +POLARS_SERIES = "orcapod.polars.series" +TORCH_TENSOR = "orcapod.torch.tensor" +POLARS_TYPES = (POLARS_DATAFRAME, POLARS_SERIES) +NUMPY_PANDAS_TYPES = (NUMPY_NDARRAY, PANDAS_DATAFRAME, PANDAS_SERIES) + + +def _library_type_name(tp: type) -> str | None: + """The provisional library value type a class is (or derives from), by name.""" + kinds: list[tuple[str, str, str]] = [ + ("numpy", "ndarray", NUMPY_NDARRAY), + ("pandas", "DataFrame", PANDAS_DATAFRAME), + ("pandas", "Series", PANDAS_SERIES), + ("polars", "DataFrame", POLARS_DATAFRAME), + ("polars", "Series", POLARS_SERIES), + ("torch", "Tensor", TORCH_TENSOR), + ] + import sys + + for module, name, declared in kinds: + # Only a library already imported can have made the class. + cls = getattr(sys.modules.get(module), name, None) + if isinstance(cls, type) and issubclass(tp, cls): + return declared + return None + + +def provisional_types_of( + item: Any, _seen: frozenset[int] = frozenset() +) -> frozenset[str]: + """The provisional library value types a value or a type is, or embeds (ITL-1324). + + A type embeds one through its generic arguments (``list[np.ndarray]``) and a user + class through its fields, at any depth: a user class's identity record holds the + identifier of each field's logical type, so a class with a field of a provisional + type has provisional hashes too. A value embeds one through its type and, for a + container, its elements. This is how a golden case splits its items into frozen + and provisional entries: the tool's use record cannot see a dependence hidden + behind an identity built earlier and cached (a registered user class), so the + split is declared from the types (``test_golden_provisional_types.py`` checks it + against each fixture class's identity record). + + Args: + item: A value or a type. + + Returns: + The declared names (``NUMPY_NDARRAY``, ...) of the types found. + """ + import typing + + from orcapod.logical_types.user_class_identity import type_hints + + if id(item) in _seen: + return frozenset() + seen = _seen | {id(item)} + names: set[str] = set() + if isinstance(item, type) or typing.get_origin(item) is not None: + tp: Any = item + for arg in typing.get_args(tp): + names |= provisional_types_of(arg, seen) + origin = typing.get_origin(tp) + if origin is not None: + tp = origin + if isinstance(tp, type): + declared = _library_type_name(tp) + if declared is not None: + names.add(declared) + elif dataclasses.is_dataclass(tp) or issubclass(tp, pydantic.BaseModel): + for hint in type_hints(tp).values(): + names |= provisional_types_of(hint, seen) + return frozenset(names) + if isinstance(item, dict): + for key, value in item.items(): + names |= provisional_types_of(key, seen) | provisional_types_of(value, seen) + elif isinstance(item, (list, tuple, set, frozenset)): + for element in item: + names |= provisional_types_of(element, seen) + return frozenset(names | provisional_types_of(type(item), seen)) def _recording() -> Any: @@ -131,10 +226,17 @@ def compute_group_kinds( """Compute every entry of one golden group, and say which entries are provisional. Each case runs while the library records the provisional features it uses - (``orcapod.utils.provisional.recording_provisional_uses``). A case that uses one it - does not declare, or declares a name ``declarable_provisional_names`` does not hold, - is refused, so a value that depends on a provisional operator can never be pinned in - a frozen file. + (``orcapod.utils.provisional.recording_provisional_uses``): a provisional operator + when it is built, a provisional library value type when it is resolved. A case that + uses one it does not declare, or declares a name ``declarable_provisional_names`` does + not hold, is refused, so a value that depends directly on a provisional feature can + never be pinned in a frozen file. The fixtures are registered first, outside every + record, so registering one is not a case's use. + + Limit: the record sees a direct use only. A user class with a field of a provisional + library type embeds that type's identifier in its identity, which is built once, at + registration, and cached; a later use of the class records nothing. Such items are + split out by ``provisional_types_of`` instead (``test_golden_provisional_types.py``). Args: group: One of ``GROUPS``. @@ -153,13 +255,16 @@ def compute_group_kinds( """ out: dict[str, Any] = {} provisional_entries: set[str] = set() + # The fixtures are registered before any case records its uses (ITL-1324). + register_logical_classes() for name, fn, declared in _CASES[group]: if not allow_errors: unknown = sorted(set(declared) - declarable_provisional_names()) if unknown: raise ValueError( f"golden case {group}:{name} declares {unknown} provisional, but " - "they are not provisional (orcapod.operators.PROVISIONAL_OPERATORS)" + "they are not provisional (orcapod.operators.PROVISIONAL_OPERATORS, " + "or 'provisional' of contexts/logical_types.json)" ) try: with _recording() as used: @@ -388,9 +493,19 @@ class GoldenHolder: note: str +_REGISTERED_WITH: set[int] = set() + + def register_logical_classes() -> None: - """Register the dataclass and pydantic fixtures with the default type converter.""" + """Register the dataclass and pydantic fixtures with the default type converter. + + Once per type converter: ``compute_group_kinds`` registers them before the recorded + cases, so registering (which resolves a field's provisional type, ``GoldenWithArray``) + is not counted as a case's use of that type (ITL-1324). + """ tc = _ctx().type_converter + if id(tc) in _REGISTERED_WITH: + return tc.register_python_class(GoldenPoint) tc.register_python_class(GoldenModel) for cls in ( @@ -405,6 +520,7 @@ def register_logical_classes() -> None: GoldenHolder, ): tc.register_python_class(cls) + _REGISTERED_WITH.add(id(tc)) PATH_A = Path("/golden/data/a.txt") @@ -500,8 +616,24 @@ def register_logical_classes() -> None: @case("semantic", "value") def semantic_values() -> dict[str, Any]: + """The values of every type but the provisional library value types.""" + hasher = _ctx().semantic_hasher + return { + k: hasher.hash_object(v).to_string() + for k, v in SEMANTIC_VALUES.items() + if not provisional_types_of(v) + } + + +@case("semantic", "value", provisional=NUMPY_PANDAS_TYPES) +def semantic_library_values() -> dict[str, Any]: + """The NumPy and pandas values of ``semantic:value``: provisional (ITL-1324).""" hasher = _ctx().semantic_hasher - return {k: hasher.hash_object(v).to_string() for k, v in SEMANTIC_VALUES.items()} + return { + k: hasher.hash_object(v).to_string() + for k, v in SEMANTIC_VALUES.items() + if provisional_types_of(v) + } def golden_fn_plain(a: int, b: str) -> float: @@ -670,9 +802,26 @@ def _semantic_types() -> dict[str, Any]: @case("semantic", "type") def semantic_types() -> dict[str, Any]: + """Every type but the provisional library value types.""" + register_logical_classes() + hasher = _ctx().semantic_hasher + return { + k: hasher.hash_object(t).to_string() + for k, t in _semantic_types().items() + if not provisional_types_of(t) + } + + +@case("semantic", "type", provisional=NUMPY_PANDAS_TYPES) +def semantic_library_types() -> dict[str, Any]: + """The NumPy and pandas types of ``semantic:type``: provisional (ITL-1324).""" register_logical_classes() hasher = _ctx().semantic_hasher - return {k: hasher.hash_object(t).to_string() for k, t in _semantic_types().items()} + return { + k: hasher.hash_object(t).to_string() + for k, t in _semantic_types().items() + if provisional_types_of(t) + } # --------------------------------------------------------------------------- @@ -690,14 +839,17 @@ def _arrow_type_text(arrow_type: pa.DataType) -> str: return str(arrow_type) -@case("schema", "single_field") -def schema_single_field() -> dict[str, Any]: +def _schema_single_field(library: bool) -> dict[str, Any]: + """``schema:single_field`` of the provisional library value types (``library``) or of + every other type.""" from orcapod.types import Schema register_logical_classes() ctx = _ctx() out: dict[str, Any] = {} for name, tp in _semantic_types().items(): + if bool(provisional_types_of(tp)) != library: + continue out[f"{name}.arrow_type"] = _arrow_type_text( ctx.type_converter.python_type_to_arrow_type(tp) ) @@ -707,6 +859,18 @@ def schema_single_field() -> dict[str, Any]: return out +@case("schema", "single_field") +def schema_single_field() -> dict[str, Any]: + """Every type but the provisional library value types.""" + return _schema_single_field(library=False) + + +@case("schema", "single_field", provisional=NUMPY_PANDAS_TYPES) +def schema_library_single_field() -> dict[str, Any]: + """The NumPy and pandas types of ``schema:single_field``: provisional (ITL-1324).""" + return _schema_single_field(library=True) + + @case("schema", "multi_field") def schema_multi_field() -> dict[str, Any]: from orcapod.types import Schema @@ -1403,8 +1567,12 @@ def run() -> dict[str, Any]: return run -for _name in _datagram_rows(): - case("datagram", _name)(_make_datagram_case(_name)) +# A datagram case whose rows hold a provisional library value type, or a user class +# embedding one, declares it (ITL-1324). +for _name, _rows in _datagram_rows().items(): + case("datagram", _name, provisional=tuple(sorted(provisional_types_of(_rows))))( + _make_datagram_case(_name) + ) def _arrow_source(column: pa.Array[Any], nullable: bool = False) -> Any: @@ -1584,7 +1752,7 @@ def pipeline_join_pod() -> dict[str, Any]: return out -@case("pipeline", "merge_join") +@case("pipeline", "merge_join", provisional=("MergeJoin",)) def pipeline_merge_join() -> dict[str, Any]: from orcapod.operators import MergeJoin, SelectDataColumns @@ -1629,6 +1797,27 @@ def _keyed(source_id: str, value: str, nullable_key: bool) -> Any: ) +def _nullability_inputs() -> tuple[Callable[[], Any], Callable[[], Any]]: + """The two inputs of ``join_key_nullability``: a nullable and a plain key.""" + + def nullable() -> Any: + return _keyed("golden_nullable_key", "x", nullable_key=True) + + def plain() -> Any: + return _keyed("golden_plain_key", "y", nullable_key=False) + + return nullable, plain + + +@case("pipeline", "join_key_nullability", provisional=("MergeJoin",)) +def pipeline_join_key_nullability_merge_join() -> dict[str, Any]: + """The ``MergeJoin`` entries of ``join_key_nullability``: provisional (ITL-1279).""" + from orcapod.operators import MergeJoin + + nullable, plain = _nullability_inputs() + return _prefixed("merge_join", stream_summary(MergeJoin()(nullable(), plain()))) + + @case("pipeline", "join_key_nullability") def pipeline_join_key_nullability() -> dict[str, Any]: """Pin the joins over a tag key that is ``T`` in one input and ``T | None`` in the other. @@ -1636,18 +1825,10 @@ def pipeline_join_key_nullability() -> dict[str, Any]: Accepted since ITL-829 (it raised before, so nothing was stored): ``Join`` and ``MergeJoin`` give the key ``T``; ``SemiJoin`` keeps the left input's schema. """ - from orcapod.operators import Join, MergeJoin, SemiJoin - - def nullable() -> Any: - return _keyed("golden_nullable_key", "x", nullable_key=True) - - def plain() -> Any: - return _keyed("golden_plain_key", "y", nullable_key=False) + from orcapod.operators import Join, SemiJoin + nullable, plain = _nullability_inputs() out = _prefixed("join", stream_summary(Join()(nullable(), plain()))) - out.update( - _prefixed("merge_join", stream_summary(MergeJoin()(nullable(), plain()))) - ) out.update( _prefixed( "semi_join_left_nullable", stream_summary(SemiJoin()(nullable(), plain())) @@ -1661,21 +1842,21 @@ def plain() -> Any: return out -@case("pipeline", "batch") +@case("pipeline", "batch", provisional=("Batch",)) def pipeline_batch() -> dict[str, Any]: from orcapod.operators import Batch return stream_summary(Batch(batch_size=2)(_subjects())) -@case("pipeline", "group_by") +@case("pipeline", "group_by", provisional=("GroupBy",)) def pipeline_group_by() -> dict[str, Any]: from orcapod.operators import GroupBy return stream_summary(GroupBy(by=["cohort"])(_grouped())) -@case("pipeline", "index_pick") +@case("pipeline", "index_pick", provisional=("Index", "Pick")) def pipeline_index_pick() -> dict[str, Any]: from orcapod.operators import Index, Pick from orcapod.sources import DictSource @@ -1781,7 +1962,7 @@ def pipeline_tag_and_data_columns() -> dict[str, Any]: return out -@case("pipeline", "map_columns") +@case("pipeline", "map_columns", provisional=("MapColumns",)) def pipeline_map_columns() -> dict[str, Any]: """``MapColumns``: tag and data columns renamed in one step (ITL-1160). @@ -1922,21 +2103,21 @@ def _polars_types() -> dict[str, Any]: return {"dataframe": pl.DataFrame, "series": pl.Series} -@case("semantic", "polars_value") +@case("semantic", "polars_value", provisional=POLARS_TYPES) def semantic_polars_values() -> dict[str, Any]: """Semantic hash of each Polars value (the ``PolarsDataFrameHandler`` digest).""" hasher = _ctx().semantic_hasher return {k: hasher.hash_object(v).to_string() for k, v in _polars_values().items()} -@case("semantic", "polars_type") +@case("semantic", "polars_type", provisional=POLARS_TYPES) def semantic_polars_types() -> dict[str, Any]: """Semantic hash of the ``pl.DataFrame`` and ``pl.Series`` type objects.""" hasher = _ctx().semantic_hasher return {k: hasher.hash_object(t).to_string() for k, t in _polars_types().items()} -@case("schema", "polars_single_field") +@case("schema", "polars_single_field", provisional=POLARS_TYPES) def schema_polars_single_field() -> dict[str, Any]: """Stored Arrow type and single-field ``Schema`` hash of each Polars class.""" from orcapod.types import Schema @@ -1953,7 +2134,7 @@ def schema_polars_single_field() -> dict[str, Any]: return out -@case("datagram", "polars_data_hash") +@case("datagram", "polars_data_hash", provisional=POLARS_TYPES) def datagram_polars_data_hash() -> dict[str, Any]: """Content hash of the ``Data`` holding each Polars value in its only data column.""" from orcapod.sources import DictSource @@ -2016,11 +2197,14 @@ def run() -> dict[str, Any]: return run -for _name in ("polars_dataframe", "polars_series"): - case("datagram", _name)(_make_polars_datagram_case(_name)) +for _name, _declared in ( + ("polars_dataframe", (POLARS_DATAFRAME,)), + ("polars_series", (POLARS_SERIES,)), +): + case("datagram", _name, provisional=_declared)(_make_polars_datagram_case(_name)) -@case("arrow", "polars_extension_no_values") +@case("arrow", "polars_extension_no_values", provisional=POLARS_TYPES) def arrow_polars_extension_columns_without_values() -> dict[str, Any]: """Table hashes of Polars-typed columns with zero rows or nulls only. @@ -2138,8 +2322,7 @@ def pipeline_polars_filter_expr_job() -> dict[str, Any]: # --------------------------------------------------------------------------- -@case("arrow", "extension_no_values") -def arrow_extension_columns_without_values() -> dict[str, Any]: +def _arrow_extension_columns_without_values(library: bool) -> dict[str, Any]: """Table hashes of value-hashed logical-type columns with zero rows or nulls only. Such a column has no cell token, so its logical type enters the hash through @@ -2162,18 +2345,34 @@ def arrow_extension_columns_without_values() -> dict[str, Any]: entries: dict[str, Any] = {} for rows, label in ((0, "zero_rows"), (2, "all_null")): for name, python_type in types.items(): + if bool(provisional_types_of(python_type)) != library: + continue arrow_type = ctx.type_converter.python_type_to_arrow_type(python_type) storage = pa.array([None] * rows, arrow_type.storage_type) column = pa.ExtensionArray.from_storage(arrow_type, storage) entries[f"{label}.{name}"] = ctx.arrow_hasher.hash_table( pa.table({"c": column}) ).to_string() - entries[f"{label}.plain_large_binary"] = ctx.arrow_hasher.hash_table( - pa.table({"c": pa.array([None] * rows, pa.large_binary())}) - ).to_string() + if not library: + entries[f"{label}.plain_large_binary"] = ctx.arrow_hasher.hash_table( + pa.table({"c": pa.array([None] * rows, pa.large_binary())}) + ).to_string() return entries +@case("arrow", "extension_no_values") +def arrow_extension_columns_without_values() -> dict[str, Any]: + """Every type but the provisional library value types.""" + return _arrow_extension_columns_without_values(library=False) + + +@case("arrow", "extension_no_values", provisional=NUMPY_PANDAS_TYPES) +def arrow_library_extension_columns_without_values() -> dict[str, Any]: + """The NumPy and pandas columns of ``arrow:extension_no_values``: provisional + (ITL-1324).""" + return _arrow_extension_columns_without_values(library=True) + + def _nullable_readings() -> Any: """A source with a nullable tag and two nullable data columns, each with a null.""" from orcapod.sources import ArrowTableSource @@ -2235,7 +2434,7 @@ def pipeline_drop_nulls_all() -> dict[str, Any]: return out -@case("pipeline", "add_tags") +@case("pipeline", "add_tags", provisional=("AddTags",)) def pipeline_add_tags() -> dict[str, Any]: """Pin ``AddTags`` (ITL-1196): its identity, one value of each type, and the rows.""" from orcapod.operators import AddTags @@ -2439,14 +2638,14 @@ def unavailable_entries(group: str) -> set[str]: } -@case("torch", "value") +@case("torch", "value", provisional=(TORCH_TENSOR,)) def torch_values() -> dict[str, Any]: """Semantic hashes of the pinned tensors.""" hasher = _ctx().semantic_hasher return {k: hasher.hash_object(v).to_string() for k, v in _torch_values().items()} -@case("torch", "type") +@case("torch", "type", provisional=(TORCH_TENSOR,)) def torch_type() -> dict[str, Any]: """Semantic hash of the ``torch.Tensor`` type.""" import torch @@ -2456,7 +2655,7 @@ def torch_type() -> dict[str, Any]: } -@case("torch", "single_field") +@case("torch", "single_field", provisional=(TORCH_TENSOR,)) def torch_single_field() -> dict[str, Any]: """Arrow type and schema hash of a one-field ``torch.Tensor`` schema.""" import torch @@ -2474,7 +2673,7 @@ def torch_single_field() -> dict[str, Any]: } -@case("torch", "datagram") +@case("torch", "datagram", provisional=(TORCH_TENSOR,)) def torch_datagram() -> dict[str, Any]: """Identity of a two-row tensor source.""" import torch @@ -2771,7 +2970,7 @@ def _group_member_order_source(tag_columns: list[str], layout: list[str]) -> Any ``tests/test_hashing/golden/test_group_by_arrangements.py`` asserts it.""" -@case("pipeline", "group_by_arrangement") +@case("pipeline", "group_by_arrangement", provisional=("GroupBy",)) def pipeline_group_by_arrangement() -> dict[str, Any]: """Pin ``GroupBy`` over several tags and data columns, in several arrangements. @@ -2804,7 +3003,7 @@ def pipeline_group_by_arrangement() -> dict[str, Any]: # --------------------------------------------------------------------------- -@case("pipeline", "group_by_nan_keys") +@case("pipeline", "group_by_nan_keys", provisional=("GroupBy",)) def pipeline_group_by_nan_keys() -> dict[str, Any]: """Pin ``GroupBy`` over a float key whose NaN and zero values differ in bits. diff --git a/tests/test_hashing/golden/test_golden_provisional_types.py b/tests/test_hashing/golden/test_golden_provisional_types.py new file mode 100644 index 000000000..7cc2d706a --- /dev/null +++ b/tests/test_hashing/golden/test_golden_provisional_types.py @@ -0,0 +1,101 @@ +"""The golden cases split their items by the provisional library value types (ITL-1324). + +A golden case's frozen part and provisional part are chosen by +``cases.provisional_types_of``, which reads a type's fields: the tool's record of uses +cannot see a dependence hidden behind an identity built earlier and cached (a registered +user class with a field of a provisional type). These tests check that predicate against +what the library itself stores: every fixture user class's identity record. A fixture +whose identity embeds a provisional type's identifier is provisional for the predicate, +and no other is, so a new fixture cannot be forgotten. +""" + +from __future__ import annotations + +import dataclasses +import inspect +import warnings +from typing import Any + +import pydantic +import pytest + +from orcapod.logical_types.user_class_identity import known_record +from tests.test_hashing.golden import cases + + +def _logical_names(token: Any) -> set[str]: + """The extension names of every logical-type token in an identity record.""" + names: set[str] = set() + if isinstance(token, dict): + logical = token.get("logical") + if isinstance(logical, str): + names.add(logical.split(";", 1)[0]) + for value in token.values(): + names |= _logical_names(value) + elif isinstance(token, list): + for value in token: + names |= _logical_names(value) + return names + + +def _fixture_classes() -> dict[str, type]: + return { + name: obj + for name, obj in vars(cases).items() + if inspect.isclass(obj) + and obj.__module__ == cases.__name__ + and (dataclasses.is_dataclass(obj) or issubclass(obj, pydantic.BaseModel)) + } + + +@pytest.fixture(scope="module", autouse=True) +def registered() -> None: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + cases.register_logical_classes() + + +def test_there_are_fixture_classes_and_one_embeds_a_provisional_type() -> None: + classes = _fixture_classes() + assert len(classes) >= 2 + assert cases.provisional_types_of(cases.GoldenWithArray) == {cases.NUMPY_NDARRAY} + + +@pytest.mark.parametrize("name", sorted(_fixture_classes())) +def test_the_predicate_agrees_with_each_fixture_class_identity_record( + name: str, +) -> None: + """The provisional types a fixture class embeds, by the predicate, are exactly the + provisional identifiers in its identity record (nested classes included).""" + cls = _fixture_classes()[name] + record = known_record(cls) + if record is None: + pytest.skip(f"{name} is not registered as a user class") + provisional = cases.declarable_provisional_names() + assert set(cases.provisional_types_of(cls)) == _logical_names(record) & provisional + + +@pytest.mark.parametrize( + ("item", "expected"), + [ + (1, set()), + ("a", set()), + ([1, (2, "x")], set()), + ({"k": [1, 2]}, set()), + ], +) +def test_a_plain_value_embeds_no_provisional_type( + item: Any, expected: set[str] +) -> None: + assert set(cases.provisional_types_of(item)) == expected + + +def test_containers_and_generic_types_are_searched() -> None: + import numpy as np + import pandas as pd + + assert cases.provisional_types_of([1, {"a": np.arange(2)}]) == {cases.NUMPY_NDARRAY} + assert cases.provisional_types_of(list[pd.DataFrame]) == {cases.PANDAS_DATAFRAME} + assert cases.provisional_types_of( + dict[str, cases.GoldenWithArray] # pyright: ignore[reportUnknownArgumentType] + ) == {cases.NUMPY_NDARRAY} diff --git a/tests/test_hashing/golden/test_golden_store.py b/tests/test_hashing/golden/test_golden_store.py index 4b2105c78..53fc614e1 100644 --- a/tests/test_hashing/golden/test_golden_store.py +++ b/tests/test_hashing/golden/test_golden_store.py @@ -11,6 +11,8 @@ from pathlib import Path from typing import Any +import numpy as np +import pandas as pd import pytest from orcapod.contexts import get_default_context @@ -791,9 +793,25 @@ def _freeze_provisional(root: Path, group: str, frozen_file: str) -> dict[str, A return entries -def _without_declarations(group: str) -> list[tuple[str, Any, tuple[str, ...]]]: - """The cases of a group as if no provisional operator were left in it.""" - return [(name, fn, ()) for name, fn, _ in cases._CASES[group]] +def _without_declaration( + group: str, feature: str = "PolarsFilter" +) -> list[tuple[str, Any, tuple[str, ...]]]: + """The cases of a group as if ``feature`` had left the provisional group: no case + declares it any more; every other declaration stays (ITL-1324: a group holds + provisional library value types too).""" + return [ + (name, fn, tuple(n for n in declared if n != feature)) + for name, fn, declared in cases._CASES[group] + ] + + +def _declaring(group: str, feature: str) -> set[str]: + """The case names of a group that declare ``feature`` and nothing else.""" + return { + name + for name, _, declared in cases._CASES[group] + if tuple(declared) == (feature,) + } def test_the_repository_pins_provisional_entries_outside_the_history() -> None: @@ -845,15 +863,20 @@ def test_relocate_refuses_a_provisional_entry_in_a_released_file(tree: Path) -> def test_relocate_freezes_the_entries_of_an_operator_that_left_the_group( tree: Path, monkeypatch: pytest.MonkeyPatch, released: bool ) -> None: - """Graduation: the entries go to the open frozen file, the provisional file goes.""" - entries = store.read_json(_provisional(tree) / "semantic.json") + """Graduation: the entries of the feature that left go to the open frozen file; the + provisional file keeps the entries of every other provisional feature.""" + graduating = _declaring("semantic", "PolarsFilter") + provisional = store.read_json(_provisional(tree) / "semantic.json") + entries = {k: v for k, v in provisional.items() if k.split(".")[0] in graduating} + staying = {k: v for k, v in provisional.items() if k not in entries} + assert entries and staying if released: main(["--root", str(tree), "--release", "0.3.0"]) newest = store.read_json(_folder(tree) / NEWEST_SEMANTIC) - monkeypatch.setitem(cases._CASES, "semantic", _without_declarations("semantic")) + monkeypatch.setitem(cases._CASES, "semantic", _without_declaration("semantic")) main(["--root", str(tree), "--relocate", "--group", "semantic"]) - assert not (_provisional(tree) / "semantic.json").exists() - assert "semantic.json" not in _listing(tree) + assert store.read_json(_provisional(tree) / "semantic.json") == staying + assert "semantic.json" in _listing(tree) if released: assert store.read_json(_folder(tree) / NEWEST_SEMANTIC) == newest assert store.read_json(_folder(tree) / NEXT_SEMANTIC) == entries @@ -879,8 +902,13 @@ def test_check_reports_a_provisional_entry_in_a_frozen_file(tree: Path) -> None: def test_check_reports_an_entry_in_the_provisional_file_whose_case_is_not( tree: Path, monkeypatch: pytest.MonkeyPatch ) -> None: - entry = sorted(store.read_json(_provisional(tree) / "semantic.json"))[0] - monkeypatch.setitem(cases._CASES, "semantic", _without_declarations("semantic")) + graduating = _declaring("semantic", "PolarsFilter") + entry = sorted( + k + for k in store.read_json(_provisional(tree) / "semantic.json") + if k.split(".")[0] in graduating + )[0] + monkeypatch.setitem(cases._CASES, "semantic", _without_declaration("semantic")) with pytest.raises( SystemExit, match=re.escape(f"semantic:{entry} is pinned in the provisional file"), @@ -896,7 +924,14 @@ def test_add_writes_provisional_entries_to_their_provisional_files( original = _everything(tree) for name in ("semantic.json", "pipeline.json"): (_provisional(tree) / name).unlink() - _set_listing(tree, {}) + _set_listing( + tree, + { + k: v + for k, v in _listing(tree).items() + if k not in ("semantic.json", "pipeline.json") + }, + ) args = ["--root", str(tree)] for group in order: args += ["--group", group] @@ -934,6 +969,9 @@ def test_removing_every_entry_of_a_provisional_file_removes_it(tree: Path) -> No def test_an_unlisted_provisional_file_is_reported(tree: Path) -> None: + listing = dict(_listing(tree)) + listing.pop("schema.json", None) + _set_listing(tree, listing) _write(_provisional(tree), "schema.json", {"x.y": "z"}) assert any( "golden.provisional does not list it" in p @@ -1067,17 +1105,110 @@ def test_a_case_declaring_an_unknown_provisional_name_is_refused( _ = cases.compute_group_kinds("semantic") -def test_the_repository_cases_declare_exactly_the_polars_filter_cases() -> None: - """The cases that depend on PolarsFilter, measured for ITL-1266, and no other.""" +def test_the_repository_cases_declare_exactly_the_measured_cases() -> None: + """The cases that depend on a provisional operator or library value type, measured + for ITL-1266, ITL-1279 and ITL-1324 (docs/dev/scripts/itl_1279/measure_relocation.py), + and no other. A split case is listed once: its provisional part.""" declared = { (group, name): names for group, registered in cases._CASES.items() for name, _, names in registered if names } + numpy_pandas = cases.NUMPY_PANDAS_TYPES + polars = cases.POLARS_TYPES + torch = (cases.TORCH_TENSOR,) assert declared == { ("semantic", "polars_expr"): ("PolarsFilter",), + ("semantic", "value"): numpy_pandas, + ("semantic", "type"): numpy_pandas, + ("semantic", "polars_value"): polars, + ("semantic", "polars_type"): polars, + ("schema", "single_field"): numpy_pandas, + ("schema", "polars_single_field"): polars, + ("arrow", "extension_no_values"): numpy_pandas, + ("arrow", "polars_extension_no_values"): polars, + ("datagram", "ndarray"): (cases.NUMPY_NDARRAY,), + ("datagram", "dataframe"): (cases.PANDAS_DATAFRAME,), + ("datagram", "structural_with_array"): (cases.NUMPY_NDARRAY,), + ("datagram", "polars_data_hash"): polars, + ("datagram", "polars_dataframe"): (cases.POLARS_DATAFRAME,), + ("datagram", "polars_series"): (cases.POLARS_SERIES,), ("pipeline", "polars_filter"): ("PolarsFilter",), ("pipeline", "polars_filter_expr"): ("PolarsFilter",), ("pipeline", "polars_filter_expr_job"): ("PolarsFilter",), + ("pipeline", "merge_join"): ("MergeJoin",), + ("pipeline", "join_key_nullability"): ("MergeJoin",), + ("pipeline", "batch"): ("Batch",), + ("pipeline", "group_by"): ("GroupBy",), + ("pipeline", "index_pick"): ("Index", "Pick"), + ("pipeline", "map_columns"): ("MapColumns",), + ("pipeline", "add_tags"): ("AddTags",), + ("pipeline", "group_by_arrangement"): ("GroupBy",), + ("pipeline", "group_by_nan_keys"): ("GroupBy",), + ("torch", "value"): torch, + ("torch", "type"): torch, + ("torch", "single_field"): torch, + ("torch", "datagram"): torch, } + + +def test_the_provisional_library_value_types_are_declarable() -> None: + """The names a case may declare include each provisional library value type + (ITL-1324), by extension name, beside the provisional operators.""" + names = cases.declarable_provisional_names() + assert { + cases.NUMPY_NDARRAY, + cases.PANDAS_DATAFRAME, + cases.PANDAS_SERIES, + cases.POLARS_DATAFRAME, + cases.POLARS_SERIES, + cases.TORCH_TENSOR, + } <= names + assert {"PolarsFilter", "GroupBy", "MergeJoin"} <= names + + +def _hashing(*values: Any) -> Any: + def fn() -> dict[str, Any]: + hasher = cases._ctx().semantic_hasher # pyright: ignore[reportPrivateUsage] + return { + f"v{i}": hasher.hash_object(v).to_string() for i, v in enumerate(values) + } + + return fn + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +@pytest.mark.parametrize( + ("values", "missing"), + [ + ((np.arange(3), pd.Series([1.0])), [cases.NUMPY_NDARRAY, cases.PANDAS_SERIES]), + ((pd.Series([1.0]), np.arange(3)), [cases.NUMPY_NDARRAY, cases.PANDAS_SERIES]), + ((1, np.arange(3)), [cases.NUMPY_NDARRAY]), + ], +) +def test_a_case_hashing_an_undeclared_library_value_type_is_refused( + monkeypatch: pytest.MonkeyPatch, values: tuple[Any, ...], missing: list[str] +) -> None: + """A direct use of a provisional library value type is recorded on every use, in + any order, so a frozen case that hashes one without declaring it is refused.""" + monkeypatch.setitem(cases._CASES, "semantic", [("lib", _hashing(*values), ())]) + with pytest.raises(ValueError, match=re.escape(f"uses the provisional {missing}")): + _ = cases.compute_group_kinds("semantic") + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +def test_a_case_declaring_the_library_value_types_it_hashes_is_provisional( + monkeypatch: pytest.MonkeyPatch, +) -> None: + monkeypatch.setitem( + cases._CASES, + "semantic", + [ + ("lib", _hashing(pd.Series([1.0]), np.arange(3)), cases.NUMPY_PANDAS_TYPES), + ("plain", _hashing(1, "a"), ()), + ], + ) + values, provisional = cases.compute_group_kinds("semantic") + assert set(values) == {"lib.v0", "lib.v1", "plain.v0", "plain.v1"} + assert provisional == frozenset({"lib.v0", "lib.v1"}) diff --git a/tests/test_logical_types/test_provisional_hash_warning.py b/tests/test_logical_types/test_provisional_hash_warning.py index b070898ec..dbd639fd1 100644 --- a/tests/test_logical_types/test_provisional_hash_warning.py +++ b/tests/test_logical_types/test_provisional_hash_warning.py @@ -374,3 +374,28 @@ def test_an_undeclared_type_never_warns(tmp_path: Path) -> None: context.semantic_hasher.hash_object(_value(name)) context.type_converter.python_type_to_arrow_type(PYTHON_TYPES[name]) assert caught == [] + + +# --------------------------------------------------------------------------- +# Every use is noted, not only the first (ITL-1324) +# --------------------------------------------------------------------------- + + +@pytest.mark.parametrize("order", [tuple(NAMES), tuple(reversed(NAMES))]) +def test_every_use_is_noted_by_extension_name_after_the_warning( + order: tuple[str, ...], +) -> None: + """The golden hash tool records the provisional types a case uses: each use is + noted by the type's extension name, also after the once-per-process warning, in + any order of use.""" + from orcapod.utils.provisional import recording_provisional_uses + + hasher = get_default_context().semantic_hasher + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + for name in order: + hasher.hash_object(_value(name)) + with recording_provisional_uses() as used: + for name in order: + hasher.hash_object(_value(name)) + assert used == set(NAMES) From 895d0415f88825cf7b2e3fb47146d9546f903c70 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 20:05:25 -0800 Subject: [PATCH 2/6] fix(operators): TagBy and AddTags name the tag-operator review (ITL-1290); Pick/Index xfails name ITL-1326 Co-Authored-By: Claude Opus 5.5 --- docs/concepts/operators.md | 2 +- src/orcapod/core/operators/provisional.py | 10 ++++++---- .../test_core/operators/test_provisional_operators.py | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/concepts/operators.md b/docs/concepts/operators.md index 8202c809b..e7a93795c 100644 --- a/docs/concepts/operators.md +++ b/docs/concepts/operators.md @@ -850,7 +850,7 @@ November 19, 2026). Each name maps to the issue that decides its identity or out | `MapColumns` | its behaviour with data-tags (ITL-1022) | | `Pick`, `Index` | the policy for a miss, which changes the output (ITL-439) | | `PolarsFilter` | whether the order of its predicates belongs to its identity (ITL-1247) | -| `TagBy`, `AddTags` | days old, their identities just changed (ITL-1279) | +| `TagBy`, `AddTags` | days old, their identities just changed: the review of the tag operators (ITL-1290) | Every other operator is frozen with data context v1: `Join`, `SemiJoin`, `MapData`, the column selections (`SelectTagColumns`, `SelectDataColumns`, `DropTagColumns`, diff --git a/src/orcapod/core/operators/provisional.py b/src/orcapod/core/operators/provisional.py index 6bb738ce2..bfdff834e 100644 --- a/src/orcapod/core/operators/provisional.py +++ b/src/orcapod/core/operators/provisional.py @@ -50,10 +50,12 @@ "Pick": "ITL-439", # As Pick (ITL-439), plus a stored source-info token known wrong (ITL-866). "Index": "ITL-439", - # Days old, its identity just changed (ITL-1226); no issue decides more yet. - "TagBy": "ITL-1279", - # Days old, its identity just changed (ITL-1269); a function form is future. - "AddTags": "ITL-1279", + # Days old, its identity just changed (ITL-1226): the review of the tag + # operators (ITL-1290). + "TagBy": "ITL-1290", + # Days old, its identity just changed (ITL-1269), a function form is future: the + # review of the tag operators (ITL-1290). + "AddTags": "ITL-1290", } ) """The provisional operators: class name to the issue that decides its identity.""" diff --git a/tests/test_core/operators/test_provisional_operators.py b/tests/test_core/operators/test_provisional_operators.py index 98a9a89dd..8a9cd83f7 100644 --- a/tests/test_core/operators/test_provisional_operators.py +++ b/tests/test_core/operators/test_provisional_operators.py @@ -121,8 +121,8 @@ def test_the_list_and_the_markers_agree() -> None: "MapColumns": "ITL-1022", "Pick": "ITL-439", "Index": "ITL-439", - "TagBy": "ITL-1279", - "AddTags": "ITL-1279", + "TagBy": "ITL-1290", + "AddTags": "ITL-1290", } # The operators frozen with data context v1 (ITL-1279). FROZEN = { @@ -391,7 +391,7 @@ def test_each_approved_operator_warns_once_through_its_stream_method(name: str) raises=TypeError, reason="Pick and Index have no to_config and are not in the operator registry of " + "pipeline/serialization.py: a saved job loads such a node read-only and never " - + "rebuilds the operator (pre-existing; found by ITL-1279, issue to be filed)", + + "rebuilds the operator (ITL-1326)", ) From ada04a62e8e2130a64b5581b011c65df1e0fdc4c Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 20:25:30 -0800 Subject: [PATCH 3/6] fix(operators): note a provisional operator's use on every identity read and application Codex review of PR 469: - A provisional operator built before a golden case (a module-level Batch(2)) was recorded only at construction, so an undeclared case reading its hash or applying it was accepted as frozen. The operator now notes its use (never the warning) where its identity is read (content_hash, pipeline_hash), where it is applied (process, static_process of the unary and binary bases) and where a stream it produced is hashed or read, as PR 466 does for sources. The note enters no hash, config or path. - Loading a saved job that holds Pick or Index (kept read-only, ITL-1326) issued no warning: the loader's read-only fallback now warns and notes the use for a saved operator named in PROVISIONAL_OPERATORS. - cases.compute_group_kinds, docs/reference/golden-hashes.md, CLAUDE.md and .zed/rules state exactly what the record sees: a hash cached before the case is not reached, and the cached user-class identity limit stays. Refs ITL-1279 Co-Authored-By: Claude Opus 5.5 --- .zed/rules | 3 +- CLAUDE.md | 3 +- docs/reference/golden-hashes.md | 21 ++- src/orcapod/core/operators/base.py | 2 + .../core/operators/static_output_pod.py | 73 +++++++++- src/orcapod/pipeline/graph.py | 12 ++ .../operators/test_provisional_operators.py | 81 +++++++++++ tests/test_hashing/golden/cases.py | 28 ++-- .../test_hashing/golden/test_golden_store.py | 135 ++++++++++++++++++ 9 files changed, 337 insertions(+), 21 deletions(-) diff --git a/.zed/rules b/.zed/rules index 1a68a9979..50766a05e 100644 --- a/.zed/rules +++ b/.zed/rules @@ -511,7 +511,8 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current way after a release. Building one (directly, through a stream method, or by loading a saved job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a - case that builds an undeclared one); its entries live in + case that builds, hashes or applies an undeclared one, also one built before the case); + its entries live in `data//provisional/.json`, listed in `golden.provisional` of the manifest, outside the history, so no release freezes them. They are checked like every other value and change only with the developer's approval of the exact list, without a new data diff --git a/CLAUDE.md b/CLAUDE.md index 01c43fd80..0d8c895da 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -522,7 +522,8 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current way after a release. Building one (directly, through a stream method, or by loading a saved job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a - case that builds an undeclared one); its entries live in + case that builds, hashes or applies an undeclared one, also one built before the case); + its entries live in `data//provisional/.json`, listed in `golden.provisional` of the manifest, outside the history, so no release freezes them. They are checked like every other value and change only with the developer's approval of the exact list, without a new data diff --git a/docs/reference/golden-hashes.md b/docs/reference/golden-hashes.md index 58780abaf..eaa418ec6 100644 --- a/docs/reference/golden-hashes.md +++ b/docs/reference/golden-hashes.md @@ -161,12 +161,19 @@ rewrites it in place. `@case("pipeline", "group_by", provisional=("GroupBy",))`, `@case("datagram", "ndarray", provisional=("orcapod.numpy.ndarray",))`. The generator runs every case while Orcapod records which provisional features it uses - (`orcapod.utils.provisional.recording_provisional_uses`: an operator when it is built, a - library value type when it is resolved), and refuses a case that uses one without - declaring it, or that declares a name that is not provisional. The golden test checks - that every entry is in the kind of file its case declares. So a value that depends - directly on a provisional feature cannot be pinned in a frozen file: neither through a - stream method that builds an operator (`stream.group_by`) nor in a step downstream of it. + (`orcapod.utils.provisional.recording_provisional_uses`), and refuses a case that uses + one without declaring it, or that declares a name that is not provisional. The golden + test checks that every entry is in the kind of file its case declares. An operator is + recorded when it is built, when its own content or pipeline hash is read, when it is + applied (`process`, its call, a stream method such as `stream.group_by`, + `static_process`), and when a stream it produced is hashed or read; a library value type + when it is resolved. So an operator built before the case, at module level, is still + recorded when the case reads its hash or applies it, and a step built in the case + downstream of it reaches it while its own hash is computed. +- **A hash cached before the case.** A stream or job node downstream of a provisional + operator that was built and hashed, or computed, before the case answers from its cached + hash or kept result and never reaches the operator, so nothing is recorded. Cases build + their pipelines inside the case. - **A dependence the record cannot see.** A user class with a field of a provisional library type (the fixture `GoldenWithArray`) embeds that type's identifier in its own identity, but the identity is built once, when the class is registered, and cached: a later use of the @@ -488,7 +495,7 @@ so the bytes that are hashed are the bytes that were committed (4). | Values on `main` after the last release are open | An unreleased commit has no guarantee | Use a released version for anything that must stay stable | | Optional groups skip without their package | `torch` values are unchecked where torch is missing | CI installs every extra | | The `date` field cannot be verified | Informational | Order and integrity come from the chain and the tags | -| Provisional values are outside the freeze | A pipeline with a provisional operator may compute its results again after an upgrade | `ProvisionalHashWarning` when the operator is built; the list in `PROVISIONAL_OPERATORS` and on the operators page | +| Provisional values are outside the freeze | A pipeline with a provisional operator may compute its results again after an upgrade | `ProvisionalHashWarning` when the operator is built or a saved job holding it is loaded; the list in `PROVISIONAL_OPERATORS` and on the operators page | A deliberate attacker with merge rights who also rewrites history and tags is beyond what any check inside the repository can stop; the PyPI artifacts remain the record of what shipped. diff --git a/src/orcapod/core/operators/base.py b/src/orcapod/core/operators/base.py index 804739208..581a3df89 100644 --- a/src/orcapod/core/operators/base.py +++ b/src/orcapod/core/operators/base.py @@ -176,6 +176,7 @@ def validate_inputs(self, *streams: StreamProtocol) -> None: def static_process(self, *streams: StreamProtocol) -> StreamProtocol: """Forward to ``unary_static_process`` with the single input stream.""" + self._note_provisional_identity_use() stream = streams[0] # No operator carries its input's Data meta columns (ITL-1080). return without_input_meta(self.unary_static_process(stream), streams) @@ -277,6 +278,7 @@ def is_commutative(self) -> bool: def static_process(self, *streams: StreamProtocol) -> StreamProtocol: """Forward to ``binary_static_process`` with two input streams.""" + self._note_provisional_identity_use() left_stream, right_stream = streams # No operator carries its inputs' Data meta columns (ITL-1080). return without_input_meta( diff --git a/src/orcapod/core/operators/static_output_pod.py b/src/orcapod/core/operators/static_output_pod.py index f7db5505d..bd44d19d3 100644 --- a/src/orcapod/core/operators/static_output_pod.py +++ b/src/orcapod/core/operators/static_output_pod.py @@ -22,6 +22,7 @@ provisional_operator_name, warn_provisional_operator, ) +from orcapod.utils.provisional import note_provisional_use from orcapod.core.streams.arrow_table_stream import ArrowTableStream from orcapod.core.streams.base import ( ZERO_ROW_INPUT_COLUMNS, @@ -97,6 +98,44 @@ def __init__( self.tracker_manager = tracker_manager or DEFAULT_TRACKER_MANAGER super().__init__(**kwargs) + def _note_provisional_identity_use(self) -> None: + """Note a use of this operator when it is provisional; never warn. + + Called where the operator's identity is read (``content_hash``, + ``pipeline_hash``) and where it is applied to streams (``process``, + ``static_process``, a ``DynamicPodStream``'s hashes and reads), so an operator + built before a recording (a module-level ``Batch(2)``) is still seen by it + (ITL-1279). The warning stays at construction. The note enters no hash, + config or path. + """ + provisional = provisional_operator_name(type(self)) + if provisional is not None: + note_provisional_use(provisional) + + def content_hash(self, hasher=None) -> ContentHash: + """The operator's content hash; notes the use of a provisional operator. + + Args: + hasher: Optional semantic hasher, as for ``ContentIdentifiableBase``. + + Returns: + The content hash, unchanged by the note. + """ + self._note_provisional_identity_use() + return super().content_hash(hasher) + + def pipeline_hash(self, hasher=None) -> ContentHash: + """The operator's pipeline hash; notes the use of a provisional operator. + + Args: + hasher: Optional semantic hasher, as for ``PipelineElementBase``. + + Returns: + The pipeline hash, unchanged by the note. + """ + self._note_provisional_identity_use() + return super().pipeline_hash(hasher) + def check_data_tag_support(self, *streams: StreamProtocol) -> None: """Raise if a data-tag reaches an operator that does not handle it yet. @@ -207,6 +246,7 @@ def process( A ``DynamicPodStream`` wrapping the computation. """ logger.debug("Invoking kernel %s on streams: %s", self, streams) + self._note_provisional_identity_use() # perform input stream validation self.check_data_tag_support(*streams) @@ -805,6 +845,33 @@ def __init__( self._kept_states: tuple[tuple[str, object], ...] | None = None self._reset_generation: int = 0 + def content_hash(self, hasher=None) -> ContentHash: + """The stream's content hash; notes the use of a provisional operator. + + The hash is cached, so the note is made here rather than where the operator's + hash is read (ITL-1279). + + Args: + hasher: Optional semantic hasher, as for ``ContentIdentifiableBase``. + + Returns: + The content hash, unchanged by the note. + """ + self._pod._note_provisional_identity_use() + return super().content_hash(hasher) + + def pipeline_hash(self, hasher=None) -> ContentHash: + """The stream's pipeline hash; notes the use of a provisional operator. + + Args: + hasher: Optional semantic hasher, as for ``PipelineElementBase``. + + Returns: + The pipeline hash, unchanged by the note. + """ + self._pod._note_provisional_identity_use() + return super().pipeline_hash(hasher) + def identity_structure(self) -> Any: structure = (self._pod,) if self._upstreams: @@ -940,7 +1007,11 @@ def _discard_result(self) -> None: def _refresh(self) -> None: """Run the operator unless its kept result is current: the one computation - path of ``as_table``, ``iter_data`` and so ``run``.""" + path of ``as_table``, ``iter_data`` and so ``run``. + + Notes the use of a provisional operator on every read, also of a kept result + (ITL-1279).""" + self._pod._note_provisional_identity_use() self._update_cache_status() # recompute if cache is invalid diff --git a/src/orcapod/pipeline/graph.py b/src/orcapod/pipeline/graph.py index 3723bd6a1..f6fdc6e0c 100644 --- a/src/orcapod/pipeline/graph.py +++ b/src/orcapod/pipeline/graph.py @@ -489,6 +489,18 @@ def load(cls, path: str | Path) -> "Pipeline": op_config.get("class_name"), exc, ) + if operator is None and op_config: + # A provisional operator kept read-only (Pick and Index have no + # config to rebuild from, ITL-1326) never reaches its constructor: + # the loaded job warns for it here, as a rebuilt one does (ITL-1279). + from orcapod.core.operators.provisional import ( + PROVISIONAL_OPERATORS, + warn_provisional_operator, + ) + + saved_name = op_config.get("class_name") + if saved_name in PROVISIONAL_OPERATORS: + warn_provisional_operator(saved_name) if operator is not None: from orcapod.logical_types.identifier import ( LogicalTypeIdentifierError, diff --git a/tests/test_core/operators/test_provisional_operators.py b/tests/test_core/operators/test_provisional_operators.py index 8a9cd83f7..eb2620426 100644 --- a/tests/test_core/operators/test_provisional_operators.py +++ b/tests/test_core/operators/test_provisional_operators.py @@ -447,3 +447,84 @@ def test_a_loaded_job_warns_once_for_each_provisional_operator_it_holds( _ = PipelineJob.load(path, database=InMemoryArrowDatabase()) names = [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] assert sorted(names) == sorted(order) + + +@pytest.mark.parametrize("name", ["Index", "Pick"]) +def test_a_loaded_job_holding_an_operator_kept_read_only_warns( + tmp_path: Any, name: str +) -> None: + """Pick and Index are not rebuilt from a saved job (ITL-1326: the strict xfail + above), so the loader keeps them read-only; the load still warns, once, through the + same helper, and notes the use (Codex review of PR 469).""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + steps = { + "Pick": lambda s: s.pick("meta", "k"), + "Index": lambda s: s.index("values", 0), + } + job = PipelineJob(name="read-only", database=InMemoryArrowDatabase()) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + with job: + _ = steps[name](_lists()) + path = tmp_path / "job.json" + job.save(path) + reset_provisional_operator_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + _ = PipelineJob.load(path, database=InMemoryArrowDatabase()) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [name] + assert used == {name} + + +@pytest.mark.parametrize("name", ["Batch", "MergeJoin"]) +def test_an_operator_built_before_a_recording_is_noted_on_every_use( + name: str, +) -> None: + """A unary and a binary provisional operator built outside the recording: reading + its identity, applying it, and reading or hashing a stream it already computed each + note the use, without warning again and without changing a hash (ITL-1279).""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + operator: Any = operators.Batch(2) if name == "Batch" else operators.MergeJoin() + + def apply() -> Any: + if name == "Batch": + return operator(_stream()) + return operator(_stream(), _other()) + + kept = apply() + _ = kept.as_table() + hashes = ( + operator.content_hash(), + operator.pipeline_hash(), + kept.content_hash(), + kept.pipeline_hash(), + ) + uses: dict[str, Any] = { + "operator content hash": operator.content_hash, + "operator pipeline hash": operator.pipeline_hash, + "applied": apply, + "applied with static_process": lambda: operator.static_process( + *(apply().upstreams) + ), + "kept stream read": kept.as_table, + "kept stream rows": lambda: list(kept.iter_data()), + "kept stream content hash": kept.content_hash, + "kept stream pipeline hash": kept.pipeline_hash, + } + for use, fn in uses.items(): + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + _ = fn() + assert used == {name}, use + assert _provisional_warnings(caught) == [], use + assert hashes == ( + operator.content_hash(), + operator.pipeline_hash(), + kept.content_hash(), + kept.pipeline_hash(), + ) diff --git a/tests/test_hashing/golden/cases.py b/tests/test_hashing/golden/cases.py index feb6a8db8..f6febcd77 100644 --- a/tests/test_hashing/golden/cases.py +++ b/tests/test_hashing/golden/cases.py @@ -226,17 +226,23 @@ def compute_group_kinds( """Compute every entry of one golden group, and say which entries are provisional. Each case runs while the library records the provisional features it uses - (``orcapod.utils.provisional.recording_provisional_uses``): a provisional operator - when it is built, a provisional library value type when it is resolved. A case that - uses one it does not declare, or declares a name ``declarable_provisional_names`` does - not hold, is refused, so a value that depends directly on a provisional feature can - never be pinned in a frozen file. The fixtures are registered first, outside every - record, so registering one is not a case's use. - - Limit: the record sees a direct use only. A user class with a field of a provisional - library type embeds that type's identifier in its identity, which is built once, at - registration, and cached; a later use of the class records nothing. Such items are - split out by ``provisional_types_of`` instead (``test_golden_provisional_types.py``). + (``orcapod.utils.provisional.recording_provisional_uses``). A provisional operator is + recorded when it is built, when its own ``content_hash`` or ``pipeline_hash`` is read, + when it is applied (``process``, its call, a stream method, ``static_process``), and + when a stream it produced is hashed or read, so also an operator built before the case + (at module level). A provisional library value type is recorded when it is resolved. A + case that uses one it does not declare, or declares a name + ``declarable_provisional_names`` does not hold, is refused. The fixtures are + registered first, outside every record, so registering one is not a case's use. + + Limits: the record sees those uses only, never a hash cached before the case. + A stream or node downstream of a provisional operator that was built and hashed, or + computed, before the case returns its cached hash or kept result without reaching the + operator, so it records nothing: build pipelines inside the case. A user class with a + field of a provisional library type embeds that type's identifier in its identity, + which is built once, at registration, and cached; a later use of the class records + nothing. Such items are split out by ``provisional_types_of`` instead + (``test_golden_provisional_types.py``). Args: group: One of ``GROUPS``. diff --git a/tests/test_hashing/golden/test_golden_store.py b/tests/test_hashing/golden/test_golden_store.py index 53fc614e1..481b3f636 100644 --- a/tests/test_hashing/golden/test_golden_store.py +++ b/tests/test_hashing/golden/test_golden_store.py @@ -6,16 +6,21 @@ from __future__ import annotations +import functools import json import re +import warnings from pathlib import Path from typing import Any import numpy as np import pandas as pd +import pyarrow as pa import pytest from orcapod.contexts import get_default_context +from orcapod.errors import ProvisionalHashWarning +from orcapod.operators import Batch, MergeJoin from tests.test_hashing.golden import cases, store from tests.test_hashing.golden.generate_golden_hashes import dump, main @@ -1095,6 +1100,136 @@ def test_a_case_using_an_undeclared_provisional_operator_is_refused( _ = cases.compute_group_kinds("semantic") +def _prebuilt_inputs() -> tuple[Any, Any]: + """Two inputs with two tags and two data columns, colliding on ``age``.""" + from orcapod.sources import ArrowTableSource + + left = pa.table( + { + "subject": ["s1", "s2", "s3"], + "session": [1, 2, 1], + "age": [2, 4, 6], + "weight": [20.5, 22.25, 19.0], + } + ) + right = pa.table( + { + "session": [2, 1], + "subject": ["s2", "s1"], + "height": [1.5, 1.25], + "age": [8, 7], + } + ) + return ( + ArrowTableSource( + left, tag_columns=["subject", "session"], tag_only_columns=True + ), + ArrowTableSource( + right, tag_columns=["session", "subject"], tag_only_columns=True + ), + ) + + +@functools.cache +def _prebuilt() -> dict[str, Any]: + """Provisional operators and their computed, hashed streams, built once and before + any case is recorded, as a module-level ``op = Batch(2)`` is: the construction + warning (and its note) falls outside every recording, so only a note on use can + reveal them (ITL-1279). Built on first call, not at import, so collecting this module + uses up no once-per-process warning.""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ProvisionalHashWarning) + batch, merge_join = Batch(2), MergeJoin() + batched, merged = batch(_prebuilt_inputs()[0]), merge_join(*_prebuilt_inputs()) + for stream in (batched, merged): + _ = stream.as_table(), stream.content_hash(), stream.pipeline_hash() + return { + "batch": batch, + "merge_join": merge_join, + "batched": batched, + "merged": merged, + } + + +# Each use of a prebuilt provisional operator inside a case: one unary, one binary. +_PREBUILT_USES: dict[str, tuple[str, Any]] = { + "unary content hash": ( + "Batch", + lambda: {"h": _prebuilt()["batch"].content_hash().to_string()}, + ), + "unary pipeline hash": ( + "Batch", + lambda: {"h": _prebuilt()["batch"].pipeline_hash().to_string()}, + ), + "unary applied": ( + "Batch", + lambda: cases.stream_summary(_prebuilt()["batch"](_prebuilt_inputs()[0])), + ), + "unary kept stream read": ( + "Batch", + lambda: {"rows": _prebuilt()["batched"].as_table().num_rows}, + ), + "unary kept stream hash": ( + "Batch", + lambda: {"h": _prebuilt()["batched"].content_hash().to_string()}, + ), + "binary content hash": ( + "MergeJoin", + lambda: {"h": _prebuilt()["merge_join"].content_hash().to_string()}, + ), + "binary pipeline hash": ( + "MergeJoin", + lambda: {"h": _prebuilt()["merge_join"].pipeline_hash().to_string()}, + ), + "binary applied": ( + "MergeJoin", + lambda: cases.stream_summary(_prebuilt()["merge_join"](*_prebuilt_inputs())), + ), + "binary applied in the other order": ( + "MergeJoin", + lambda: cases.stream_summary( + _prebuilt()["merge_join"](*reversed(_prebuilt_inputs())) + ), + ), + "binary kept stream read": ( + "MergeJoin", + lambda: {"rows": _prebuilt()["merged"].as_table().num_rows}, + ), + "binary kept stream pipeline hash": ( + "MergeJoin", + lambda: {"h": _prebuilt()["merged"].pipeline_hash().to_string()}, + ), +} + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +@pytest.mark.parametrize("use", sorted(_PREBUILT_USES)) +def test_a_case_using_a_prebuilt_provisional_operator_undeclared_is_refused( + monkeypatch: pytest.MonkeyPatch, use: str +) -> None: + """An operator built before the case (at module level) is noted where its identity + is read and where it is applied, so an undeclared case is refused (Codex review of + PR 469).""" + name, fn = _PREBUILT_USES[use] + _ = _prebuilt() + monkeypatch.setitem(cases._CASES, "semantic", [("prebuilt", fn, ())]) + with pytest.raises(ValueError, match=re.escape(f"uses the provisional {[name]}")): + _ = cases.compute_group_kinds("semantic") + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +@pytest.mark.parametrize("use", sorted(_PREBUILT_USES)) +def test_a_case_declaring_a_prebuilt_provisional_operator_is_provisional( + monkeypatch: pytest.MonkeyPatch, use: str +) -> None: + name, fn = _PREBUILT_USES[use] + _ = _prebuilt() + monkeypatch.setitem(cases._CASES, "semantic", [("prebuilt", fn, (name,))]) + values, provisional = cases.compute_group_kinds("semantic") + assert values + assert provisional == frozenset(values) + + def test_a_case_declaring_an_unknown_provisional_name_is_refused( monkeypatch: pytest.MonkeyPatch, two_provisional: None ) -> None: From 1abf783802414125d66600fc46aa19571c7ed748 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 20:55:39 -0800 Subject: [PATCH 4/6] feat(sources): DerivedSource is provisional, both forms (ITL-1331) Developer decision, November 21, 2026: "Let's also make DerivedSource as provisional?" - PROVISIONAL_SOURCES gains DerivedSource (its identity decided by ITL-1317) and the class sets PROVISIONAL = True: building one, also through node.as_source() on a function or operator node, from_config or a loaded job, warns once per process. Every read of its rows notes the use, as a provisional operator's stream does; reading its source id or hashes already does (RootSource). No id, hash, config or path changes. - The operator's use note uses the same helper pair as RootSource (provisional_class_name, note_provisional_use): one mechanism. - Golden tool: a provisional source is declarable. schema:derived_source_tags_as_data declares DerivedSource; schema:key_policy_identity and pipeline:default_source_ids are split (their derived entries declared, entry names unchanged). The 32 entries move with the relocation, which has not run yet. A case building a PollingSource undeclared is still refused; none declares one. - Docs: sources page, tutorial page 8 (one sentence on the warning), golden-hashes reference, CLAUDE.md and .zed/rules, changelog (Known limitations). Refs ITL-1331 Co-Authored-By: Claude Opus 5.5 --- .zed/rules | 26 +- CLAUDE.md | 24 +- changelog.d/ITL-1279.md | 12 + docs/concepts/sources.md | 27 +- .../scripts/itl_1279/measure_relocation.py | 7 +- docs/reference/golden-hashes.md | 38 ++- docs/tutorial/08-inspecting-and-tracing.md | 5 +- .../core/operators/static_output_pod.py | 9 +- src/orcapod/core/sources/derived_source.py | 11 + src/orcapod/core/sources/provisional.py | 16 +- .../sources/test_provisional_sources.py | 281 +++++++++++++++++- tests/test_hashing/golden/cases.py | 73 +++-- .../test_hashing/golden/test_golden_store.py | 183 +++++++++++- 13 files changed, 625 insertions(+), 87 deletions(-) diff --git a/.zed/rules b/.zed/rules index 929d3901c..f9b2bb656 100644 --- a/.zed/rules +++ b/.zed/rules @@ -526,16 +526,22 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current identifier in an identity built once and cached, so golden items are split by `cases.provisional_types_of` (checked against every fixture class's identity record). - Provisional sources are outside the freeze too (developer, November 21, 2026, ITL-1314: - "make polling source provisional"): orcapod.sources.PROVISIONAL_SOURCES - (core/sources/provisional.py) is the one list (today PollingSource, its identity - decided by ITL-1316), each listed class sets PROVISIONAL = True (declared on - RootSource, which warns when one is constructed, also through from_config), and building - one issues ProvisionalHashWarning once per source kind per process. The warning and the - use record are one helper, utils/provisional.warn_provisional_use (operators use it - too). Unlike a provisional operator, a provisional source is never pinned, in no golden - file: only operators can be declared by a golden case, so compute_group_kinds refuses a - case that builds one. The mark never enters a hash, an identifier, a config or a stored - path. + "make polling source provisional"; ITL-1331: "Let's also make DerivedSource as + provisional?", both forms): `orcapod.sources.PROVISIONAL_SOURCES` + (`core/sources/provisional.py`) is the one list (today `PollingSource`, its identity + decided by ITL-1316, and `DerivedSource`, plain and `tags_as_data`, by ITL-1317), each + listed class sets `PROVISIONAL = True` (declared on `RootSource`, which warns when one is + constructed, also through `node.as_source()`, `from_config` and a loaded job), and building + one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream + of a provisional source is provisional. The warning and the use record are one helper, + `utils/provisional.warn_provisional_use` (operators use it too); a source notes its use + again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`; a + `DerivedSource` also on every read of rows), as an operator does where its identity is + read or it is applied (one helper pair, `provisional_class_name` and + `note_provisional_use`). A golden case declares a provisional source as it does an + operator (`provisional=("DerivedSource",)`), and its entries live in the provisional + files; no case builds a `PollingSource` (its pins were removed, ITL-1314). The mark never + enters a hash, an identifier, a config or a stored path. - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/CLAUDE.md b/CLAUDE.md index 14c531248..37bf8f1bc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -537,16 +537,22 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current identifier in an identity built once and cached, so golden items are split by `cases.provisional_types_of` (checked against every fixture class's identity record). - Provisional sources are outside the freeze too (developer, November 21, 2026, ITL-1314: - "make polling source provisional"): `orcapod.sources.PROVISIONAL_SOURCES` + "make polling source provisional"; ITL-1331: "Let's also make DerivedSource as + provisional?", both forms): `orcapod.sources.PROVISIONAL_SOURCES` (`core/sources/provisional.py`) is the one list (today `PollingSource`, its identity - decided by ITL-1316), each listed class sets `PROVISIONAL = True` (declared on - `RootSource`, which warns when one is constructed, also through `from_config`), and building - one issues `ProvisionalHashWarning` once per source kind per process. The warning and the - use record are one helper, `utils/provisional.warn_provisional_use` (operators use it - too). Unlike a provisional operator, a provisional source is never pinned, in no golden - file: only operators can be declared by a golden case, so `compute_group_kinds` refuses a - case that builds one. The mark never enters a hash, an identifier, a config or a stored - path. + decided by ITL-1316, and `DerivedSource`, plain and `tags_as_data`, by ITL-1317), each + listed class sets `PROVISIONAL = True` (declared on `RootSource`, which warns when one is + constructed, also through `node.as_source()`, `from_config` and a loaded job), and building + one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream + of a provisional source is provisional. The warning and the use record are one helper, + `utils/provisional.warn_provisional_use` (operators use it too); a source notes its use + again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`; a + `DerivedSource` also on every read of rows), as an operator does where its identity is + read or it is applied (one helper pair, `provisional_class_name` and + `note_provisional_use`). A golden case declares a provisional source as it does an + operator (`provisional=("DerivedSource",)`), and its entries live in the provisional + files; no case builds a `PollingSource` (its pins were removed, ITL-1314). The mark never + enters a hash, an identifier, a config or a stored path. - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/changelog.d/ITL-1279.md b/changelog.d/ITL-1279.md index e95a0f65b..3f4771b71 100644 --- a/changelog.d/ITL-1279.md +++ b/changelog.d/ITL-1279.md @@ -14,3 +14,15 @@ NumPy arrays, torch tensors and pandas and Polars frames and series, and a user class with a field of one of them, whose identity embeds that type's identifier (ITL-1324). No value changes. + +### Known limitations + +- **`DerivedSource` is provisional, in both forms:** `node.as_source()` (and + `DerivedSource(origin)`) and `DerivedSource(origin, tags_as_data=...)` are in + `orcapod.sources.PROVISIONAL_SOURCES` beside `PollingSource`. Their source ids and hashes + are not frozen with data context v1, so a later release may change them, and every step + built on one then computes its results again instead of reusing them (nothing stored is + lost or wrong). Building one, also through `node.as_source()`, from a saved config or by + loading a saved job, issues `ProvisionalHashWarning` once per process. No id, hash, config + or stored path changes, and their golden values moved, unchanged, to the provisional + golden files. (ITL-1331) diff --git a/docs/concepts/sources.md b/docs/concepts/sources.md index a88a9fd92..4d38a30c2 100644 --- a/docs/concepts/sources.md +++ b/docs/concepts/sources.md @@ -606,7 +606,8 @@ column as nullable. ### `DerivedSource` A `DerivedSource` is a source whose rows come from something Orcapod already has: another -source, or a node of a job. It has two uses. +source, or a node of a job. It has two uses. It is [provisional](#provisional-sources) in both +forms: its identity may change in a later release. **Reading a job's results.** A `DerivedSource` reads the stored results of a node of a [`PipelineJob`](function-pods.md#pipelinejob-database-backed-cached-execution) that has run @@ -712,20 +713,30 @@ new data, which is what a source is for. ### Provisional sources Data context v1 freezes the hashes of Orcapod at the 0.4.0 release. A provisional source is -outside that freeze: its default `source_id` and its content hash are still being decided -(ITL-1316), so a later release may change them, and with them the system tags, stored paths -and record ids of its rows and of every step downstream of it, which then compute their -results again (nothing stored is lost or wrong). It works as any source does otherwise. +outside that freeze: its default `source_id` and its content hash are still being decided, so +a later release may change them, and with them the system tags, stored paths and record ids +of its rows and of every step downstream of it, which then compute their results again +(nothing stored is lost or wrong). It works as any source does otherwise. ```python from orcapod.sources import PROVISIONAL_SOURCES print(sorted(PROVISIONAL_SOURCES)) -# ['PollingSource'] +# ['DerivedSource', 'PollingSource'] ``` -Building one, directly or from a saved config, issues `orcapod.errors.ProvisionalHashWarning` -once per process; filter its class to silence it, as for +| Source | What is still open | +|---|---| +| `PollingSource` | its default source id hashes the implementation's own identity, and its content hash leaves out the source id and the declared schema (ITL-1316) | +| `DerivedSource`, both forms | the plain form (`node.as_source()`) hashes only its origin's content hash and accepts a `source_id` its identity does not use; the `tags_as_data` form changed just before this release (ITL-1317) | + +So everything built on a `DerivedSource`, whether it came from `node.as_source()` or from +`DerivedSource(origin, tags_as_data=...)`, is provisional too: every step downstream of it +keeps its hashes only until its identity is decided. + +Building one, directly, through `node.as_source()` on a function or operator node, from a +saved config or by loading a saved job, issues `orcapod.errors.ProvisionalHashWarning` once +per source kind per process; filter its class to silence it, as for [provisional operators](operators.md#provisional-operators). ## What a source does at a run diff --git a/docs/dev/scripts/itl_1279/measure_relocation.py b/docs/dev/scripts/itl_1279/measure_relocation.py index b47e41dc4..f892a2ccf 100644 --- a/docs/dev/scripts/itl_1279/measure_relocation.py +++ b/docs/dev/scripts/itl_1279/measure_relocation.py @@ -5,7 +5,9 @@ ``mixed``: per entry, for the cases that mix frozen and provisional entries. In this process only, the approved provisional operators are marked provisional -(``PROVISIONAL = True`` and ``PROVISIONAL_OPERATORS``), and the use of a provisional +(``PROVISIONAL = True`` and ``PROVISIONAL_OPERATORS``; a no-op once the code marks them), +a provisional source (``DerivedSource``, ITL-1331) is noted by the code itself, and the use +of a provisional library value type (``provisional`` of ``contexts/logical_types.json``) is noted by its extension name, as the change will do. Every golden case of every available group then runs inside ``recording_provisional_uses``. For each case that uses a provisional feature @@ -85,6 +87,9 @@ def main() -> None: import cases # pyright: ignore[reportMissingImports] from orcapod.utils.provisional import recording_provisional_uses + # As compute_group_kinds does: the fixtures are registered outside every record, so + # registering one (GoldenWithArray resolves the ndarray type) is no case's use. + cases.register_logical_classes() where = pinned_files() totals: Counter[str] = Counter() by_feature: Counter[str] = Counter() diff --git a/docs/reference/golden-hashes.md b/docs/reference/golden-hashes.md index eaa418ec6..0a0cbb532 100644 --- a/docs/reference/golden-hashes.md +++ b/docs/reference/golden-hashes.md @@ -152,13 +152,14 @@ tests/test_hashing/golden/data/ ### Provisional files `tests/test_hashing/golden/data/v1/provisional/.json` holds the values of the cases -that depend on a provisional operator (ITL-1266, ITL-1279) or a provisional library value type -(ITL-1324), one file per group and no counter: such a file is never frozen, and the generator +that depend on a provisional operator (ITL-1266, ITL-1279), a provisional source (ITL-1331) or +a provisional library value type (ITL-1324), one file per group and no counter: such a file is never frozen, and the generator rewrites it in place. -- **Which entries.** A case declares the provisional features it depends on, operators by - class name and library value types by extension name: +- **Which entries.** A case declares the provisional features it depends on, operators and + sources by class name and library value types by extension name: `@case("pipeline", "group_by", provisional=("GroupBy",))`, + `@case("schema", "derived_source_tags_as_data", provisional=("DerivedSource",))`, `@case("datagram", "ndarray", provisional=("orcapod.numpy.ndarray",))`. The generator runs every case while Orcapod records which provisional features it uses (`orcapod.utils.provisional.recording_provisional_uses`), and refuses a case that uses @@ -166,13 +167,14 @@ rewrites it in place. test checks that every entry is in the kind of file its case declares. An operator is recorded when it is built, when its own content or pipeline hash is read, when it is applied (`process`, its call, a stream method such as `stream.group_by`, - `static_process`), and when a stream it produced is hashed or read; a library value type - when it is resolved. So an operator built before the case, at module level, is still + `static_process`), and when a stream it produced is hashed or read; a source when it is + built and when its source id, content or pipeline hash is read (a `DerivedSource` also + when its rows are read); a library value type when it is resolved. So an operator built before the case, at module level, is still recorded when the case reads its hash or applies it, and a step built in the case downstream of it reaches it while its own hash is computed. - **A hash cached before the case.** A stream or job node downstream of a provisional - operator that was built and hashed, or computed, before the case answers from its cached - hash or kept result and never reaches the operator, so nothing is recorded. Cases build + operator or source that was built and hashed, or computed, before the case answers from its cached + hash or kept result and never reaches it, so nothing is recorded. Cases build their pipelines inside the case. - **A dependence the record cannot see.** A user class with a field of a provisional library type (the fixture `GoldenWithArray`) embeds that type's identifier in its own identity, but @@ -184,23 +186,27 @@ rewrites it in place. predicate against every fixture class's identity record. - **Split cases.** A case whose items are partly provisional is registered twice under its one name, the provisional part declared, so every entry keeps its name: `semantic:value`, - `semantic:type`, `schema:single_field`, `arrow:extension_no_values` and - `pipeline:join_key_nullability` (its `merge_join.*` entries). -- **Today:** 443 entries. The `PolarsFilter` cases (`polars_filter`, `polars_filter_expr`, + `semantic:type`, `schema:single_field`, `arrow:extension_no_values`, + `pipeline:join_key_nullability` (its `merge_join.*` entries), + `schema:key_policy_identity` (its `derived_tags_as_data.*` entries) and + `pipeline:default_source_ids` (its `as_source[...]` entries). +- **No `PollingSource` values.** No case builds a `PollingSource` (ITL-1314): its pins were + removed rather than kept provisional. +- **Today:** 475 entries. The `PolarsFilter` cases (`polars_filter`, `polars_filter_expr`, `polars_filter_expr_job` and the `semantic` case `polars_expr`, 86 entries) moved out of the frozen files with ITL-1266; the cases of the other provisional operators (229 entries) and of the library value types (128 entries, with the 12 of `GoldenWithArray`) moved with - ITL-1279 and ITL-1324. Every move was values unchanged, before `v1` was frozen. + ITL-1279 and ITL-1324, and those of `DerivedSource` (32 entries) with ITL-1331. Every move was values unchanged, before `v1` was frozen. - **What holds.** Every provisional value is computed and compared on every CI run, so a change nobody intended fails. An intended change needs the developer's approval of the exact list of entries that move, each explained (`--remove`, then `--add`), but no new data context, before or after a release. `--release` neither lists nor pins a provisional file, the manifest pin leaves out `golden`, and the tag check does not compare them. -- **Leaving the group.** When an operator stops being provisional, at a release, it leaves - `PROVISIONAL_OPERATORS`, its `PROVISIONAL` marker and its cases' declarations go, and +- **Leaving the group.** When an operator (or a source) stops being provisional, at a + release, it leaves `PROVISIONAL_OPERATORS` (or `PROVISIONAL_SOURCES`), its `PROVISIONAL` marker and its cases' declarations go, and `generate_golden_hashes.py --relocate` moves its entries, values unchanged, into the open frozen file of their group. The `--release` step then freezes them. -- **Joining the group.** Only an operator whose values no release lists can become +- **Joining the group.** Only an operator or source whose values no release lists can become provisional: `--relocate` refuses to move an entry out of a file a release lists. ### Digest definitions @@ -495,7 +501,7 @@ so the bytes that are hashed are the bytes that were committed (4). | Values on `main` after the last release are open | An unreleased commit has no guarantee | Use a released version for anything that must stay stable | | Optional groups skip without their package | `torch` values are unchecked where torch is missing | CI installs every extra | | The `date` field cannot be verified | Informational | Order and integrity come from the chain and the tags | -| Provisional values are outside the freeze | A pipeline with a provisional operator may compute its results again after an upgrade | `ProvisionalHashWarning` when the operator is built or a saved job holding it is loaded; the list in `PROVISIONAL_OPERATORS` and on the operators page | +| Provisional values are outside the freeze | A pipeline with a provisional operator or source (`DerivedSource`, `PollingSource`) may compute its results again after an upgrade | `ProvisionalHashWarning` when the operator or source is built or a saved job holding it is loaded; the lists in `PROVISIONAL_OPERATORS` and `PROVISIONAL_SOURCES`, on the operators and sources pages | A deliberate attacker with merge rights who also rewrites history and tags is beyond what any check inside the repository can stop; the PyPI artifacts remain the record of what shipped. diff --git a/docs/tutorial/08-inspecting-and-tracing.md b/docs/tutorial/08-inspecting-and-tracing.md index baa505dfc..4d1aed975 100644 --- a/docs/tutorial/08-inspecting-and-tracing.md +++ b/docs/tutorial/08-inspecting-and-tracing.md @@ -211,7 +211,10 @@ print(session_means.keys()) ``` A `DerivedSource` is a source like those of Part 1, so it can be joined, filtered and fed to -pods. Here the next stage flags sessions with a low mean rate: +pods. The first one you build prints a `ProvisionalHashWarning`, once: its identity is not +frozen yet, so a later release of Orcapod may compute the stages built on it again instead of +reusing what they stored (see [Provisional sources](../concepts/sources.md#provisional-sources)). +Here the next stage flags sessions with a low mean rate: ```python @function_pod(output_keys="is_low") diff --git a/src/orcapod/core/operators/static_output_pod.py b/src/orcapod/core/operators/static_output_pod.py index bd44d19d3..25ba8750e 100644 --- a/src/orcapod/core/operators/static_output_pod.py +++ b/src/orcapod/core/operators/static_output_pod.py @@ -22,7 +22,7 @@ provisional_operator_name, warn_provisional_operator, ) -from orcapod.utils.provisional import note_provisional_use +from orcapod.utils.provisional import note_provisional_use, provisional_class_name from orcapod.core.streams.arrow_table_stream import ArrowTableStream from orcapod.core.streams.base import ( ZERO_ROW_INPUT_COLUMNS, @@ -105,10 +105,11 @@ def _note_provisional_identity_use(self) -> None: ``pipeline_hash``) and where it is applied to streams (``process``, ``static_process``, a ``DynamicPodStream``'s hashes and reads), so an operator built before a recording (a module-level ``Batch(2)``) is still seen by it - (ITL-1279). The warning stays at construction. The note enters no hash, - config or path. + (ITL-1279). The same note as ``RootSource._note_provisional_identity_use`` for a + provisional source (ITL-1314). The warning stays at construction. The note + enters no hash, config or path. """ - provisional = provisional_operator_name(type(self)) + provisional = provisional_class_name(type(self)) if provisional is not None: note_provisional_use(provisional) diff --git a/src/orcapod/core/sources/derived_source.py b/src/orcapod/core/sources/derived_source.py index 7e57f275f..9a8df680b 100644 --- a/src/orcapod/core/sources/derived_source.py +++ b/src/orcapod/core/sources/derived_source.py @@ -91,6 +91,12 @@ def validate_tags_as_data( class DerivedSource(RootSource): """A source whose rows are derived from another source or from a job node. + Provisional in data context v1, in both forms (ITL-1331, ``PROVISIONAL_SOURCES``): + its source id and hashes are not frozen and may change in a later release (ITL-1317), + and so are those of every step downstream of it. Building one, also through + ``node.as_source()``, ``from_config`` or a loaded job, issues + ``ProvisionalHashWarning`` once per process. + There are two forms. **Plain** (``tags_as_data`` not given), created by ``FunctionNode.as_source()`` @@ -179,6 +185,8 @@ class DerivedSource(RootSource): # The config type key (names the class a saved config is rebuilt with) and # the kind prefix of the plain form's default source id. SOURCE_KIND: ClassVar[str] = "derived" + PROVISIONAL = True + """Provisional in data context v1, both forms (ITL-1331, ``PROVISIONAL_SOURCES``).""" @staticmethod def _missing_source_id() -> ValueError: @@ -517,6 +525,9 @@ def _derive_from( return result.stream def _get_stream(self) -> ArrowTableStream: + # Every read of rows notes the provisional use, also of rows kept from an + # earlier read (ITL-1331), as a provisional operator's stream does. + self._note_provisional_identity_use() if self._tags_as_data is not None: if self._cached_stream is not None: return self._cached_stream diff --git a/src/orcapod/core/sources/provisional.py b/src/orcapod/core/sources/provisional.py index cc6b18283..b70b90dc4 100644 --- a/src/orcapod/core/sources/provisional.py +++ b/src/orcapod/core/sources/provisional.py @@ -3,16 +3,17 @@ Data context v1 freezes every hash at the 0.4.0 release. A provisional source is outside that freeze: its default source id and its content hash (and so the system-tag values, source-info tokens, stored paths and record ids downstream of it) may still change in a -later release. No golden value depends on one: a golden case that uses a provisional -source is refused by the golden tool, since only provisional operators may be declared. +later release. A golden case that uses one declares it, and its golden values are kept in +the provisional golden files, as for a provisional operator (ITL-1331); a case that uses +one undeclared is refused by the golden tool. ``PROVISIONAL_SOURCES`` is the one list. Each listed source also sets the class attribute ``PROVISIONAL = True`` (declared on ``RootSource``); a test checks that the list and the markers agree. Constructing a provisional source, also through ``from_config``, issues ``ProvisionalHashWarning`` once per source kind per process and notes the use -(``utils/provisional.warn_provisional_use``). The mark enters no hash, identifier, config -or stored path. A source leaves the list when its identity is decided; its golden values -are then added. +(``utils/provisional.warn_provisional_use``); reading its identity notes the use again. The +mark enters no hash, identifier, config or stored path. A source leaves the list when its +identity is decided; its golden values then move into a frozen golden file. """ from __future__ import annotations @@ -27,6 +28,11 @@ # Its default source id hashes the implementation's own identity(), and its # content hash leaves out the source id and the declared schema (ITL-1316). "PollingSource": "ITL-1316", + # Both forms (developer, November 21, 2026, ITL-1331): the plain form + # (``node.as_source()``) hashes only its origin's content hash and accepts a + # source id its identity does not use; the tags_as_data form changed days before + # the release (ITL-1313). The source identity follow-ups decide it (ITL-1317). + "DerivedSource": "ITL-1317", } ) """The provisional sources: class name to the issue that decides its identity.""" diff --git a/tests/test_core/sources/test_provisional_sources.py b/tests/test_core/sources/test_provisional_sources.py index c52b689c6..58a13a5b1 100644 --- a/tests/test_core/sources/test_provisional_sources.py +++ b/tests/test_core/sources/test_provisional_sources.py @@ -1,9 +1,10 @@ -"""Provisional sources: the list, the markers and the warning (ITL-1314). +"""Provisional sources: the list, the markers and the warning (ITL-1314, ITL-1331). -Developer decision, November 21, 2026: "make polling source provisional". A -``PollingSource`` behaves as before (its default source id included), but its source id -and hashes are not frozen with data context v1, so building one warns once per process -and no golden value depends on one. +Developer decisions, November 21, 2026: "make polling source provisional", and "Let's also +make DerivedSource as provisional?" (both forms). Each behaves as before (its default +source id included), but its source id and hashes are not frozen with data context v1, so +building one warns once per process; no golden case builds a ``PollingSource``, and the +golden values of a ``DerivedSource`` are kept in the provisional golden files. """ from __future__ import annotations @@ -13,10 +14,17 @@ from collections.abc import Iterator from typing import Any +import pyarrow as pa import pytest import orcapod.sources as sources -from orcapod.core.sources import PROVISIONAL_SOURCES, PollingSource, RootSource +from orcapod import function_pod +from orcapod.core.sources import ( + PROVISIONAL_SOURCES, + DerivedSource, + PollingSource, + RootSource, +) from orcapod.errors import ProvisionalHashWarning from orcapod.utils.provisional import ( recording_provisional_uses, @@ -82,7 +90,11 @@ def test_the_list_and_the_markers_agree() -> None: and issubclass(obj, RootSource) } marked = {name for name, cls in exported.items() if cls.__dict__.get("PROVISIONAL")} - assert marked == set(PROVISIONAL_SOURCES) == {"PollingSource"} + assert marked == set(PROVISIONAL_SOURCES) == {"PollingSource", "DerivedSource"} + assert dict(PROVISIONAL_SOURCES) == { + "PollingSource": "ITL-1316", + "DerivedSource": "ITL-1317", + } def test_one_warning_for_several_constructions() -> None: @@ -146,7 +158,258 @@ def test_behavior_is_unchanged_default_source_id_included() -> None: assert _polling("a").source_id == first.source_id -def test_a_golden_case_cannot_declare_a_provisional_source() -> None: +def test_a_golden_case_can_declare_a_provisional_source() -> None: + """A provisional source is declarable (ITL-1331); no golden case builds a + PollingSource (ITL-1314), which ``test_golden_store`` checks.""" from tests.test_hashing.golden.cases import declarable_provisional_names - assert not set(PROVISIONAL_SOURCES) & declarable_provisional_names() + assert set(PROVISIONAL_SOURCES) <= declarable_provisional_names() + + +# --------------------------------------------------------------------------- +# DerivedSource, both forms (ITL-1331) +# --------------------------------------------------------------------------- + + +@function_pod(output_keys="total") +def _total(age: int, weight: float) -> float: + return age + weight + + +def _origin(source_id: str = "people") -> Any: + """Two tags and two data columns.""" + from orcapod.sources import ArrowTableSource + + table = pa.table( + { + "subject": ["s1", "s2", "s3"], + "session": [1, 2, 1], + "age": [2, 4, 6], + "weight": [20.5, 22.25, 19.0], + }, + schema=pa.schema( + [ + pa.field("subject", pa.large_string(), nullable=False), + pa.field("session", pa.int64(), nullable=False), + pa.field("age", pa.int64(), nullable=False), + pa.field("weight", pa.float64(), nullable=False), + ] + ), + ) + return ArrowTableSource( + table, + tag_columns=["subject", "session"], + tag_only_columns=True, + source_id=source_id, + ) + + +def _ran_job() -> Any: + """A job with a function node (``total``) and an operator node (``picked``) that + stores its rows, run once.""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + from orcapod.operators import SelectDataColumns + + job = PipelineJob(name="derived", database=InMemoryArrowDatabase()) + with job: + _total.pod(_origin(), label="total") + SelectDataColumns(["age", "weight"])(_origin(), label="picked") + job.run() + return job + + +AS_DATA = {"session": "session_value", "subject": "subject_value"} + +# Each way a user builds a DerivedSource: both forms, over a source and over both node +# kinds. +DERIVED_FORMS: dict[str, Any] = { + "tags_as_data over a source": lambda job: DerivedSource( + _origin(), tags_as_data=AS_DATA, source_id="copied" + ), + "tags_as_data, reversed mapping": lambda job: DerivedSource( + _origin(), + tags_as_data=dict(reversed(list(AS_DATA.items()))), + source_id="copied", + ), + "plain over the function node": lambda job: job.nodes["total"].as_source(), + "plain over the operator node": lambda job: job.nodes["picked"].as_source(), + "tags_as_data over the function node": lambda job: job.nodes["total"].as_source( + tags_as_data=AS_DATA, source_id="total_copied" + ), + "tags_as_data over the operator node": lambda job: job.nodes["picked"].as_source( + tags_as_data=AS_DATA, source_id="picked_copied" + ), +} + + +def test_derived_source_warns_once_for_every_form_and_node_kind() -> None: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + job = _ran_job() + reset_provisional_use_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + for build in DERIVED_FORMS.values(): + _ = build(job) + _ = build(job) + messages = _provisional_warnings(caught) + assert len(messages) == 1, messages + assert messages[0].startswith("DerivedSource is provisional") + + +@pytest.mark.parametrize("form", sorted(DERIVED_FORMS)) +def test_each_derived_form_warns_in_a_new_process(form: str) -> None: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + job = _ran_job() + reset_provisional_use_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + _ = DERIVED_FORMS[form](job) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [ + "DerivedSource" + ] + assert used == {"DerivedSource"} + + +def _csv_origin(tmp_path: Any) -> Any: + """An origin that a config can rebuild: two tags and two data columns.""" + from orcapod.sources import CSVSource + + path = tmp_path / "people.csv" + _ = path.write_text("subject,session,age,weight\ns1,1,2,20.5\ns2,2,4,22.25\n") + return CSVSource( + str(path), tag_columns=["subject", "session"], tag_only_columns=True + ) + + +def test_derived_source_from_config_warns(tmp_path: Any) -> None: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + config = DerivedSource( + _csv_origin(tmp_path), tags_as_data=AS_DATA, source_id="copied" + ).to_config() + reset_provisional_use_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + rebuilt = DerivedSource.from_config(config) + assert rebuilt.source_id == "copied" + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [ + "DerivedSource" + ] + + +def test_a_loaded_job_reading_a_derived_source_warns(tmp_path: Any) -> None: + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + job = PipelineJob(name="over_derived", database=InMemoryArrowDatabase()) + with job: + derived = DerivedSource( + _csv_origin(tmp_path), tags_as_data=AS_DATA, source_id="copied" + ) + _ = derived.select_data_columns(["age", "subject_value"], label="picked") + path = tmp_path / "job.json" + job.save(path) + reset_provisional_use_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + loaded = PipelineJob.load(path, database=InMemoryArrowDatabase()) + assert isinstance(loaded.sources["copied"], DerivedSource) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [ + "DerivedSource" + ] + + +def test_no_other_source_kind_warns(tmp_path: Any) -> None: + import polars as pl + + from orcapod.sources import ( + ArrowTableSource, + CSVSource, + DataFrameSource, + DictSource, + ListSource, + ) + + rows = [ + {"subject": "s1", "session": 1, "age": 2, "weight": 20.5}, + {"subject": "s2", "session": 2, "age": 4, "weight": 22.25}, + ] + csv = tmp_path / "rows.csv" + pl.DataFrame(rows).write_csv(csv) + tags = ["subject", "session"] + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + built = [ + _origin(), + ArrowTableSource( + pa.Table.from_pylist(rows), tag_columns=tags, tag_only_columns=True + ), + DictSource(data=rows, tag_columns=tags, tag_only_columns=True), + DataFrameSource( + pl.DataFrame(rows), tag_columns=tags, tag_only_columns=True + ), + CSVSource(str(csv), tag_columns=tags, tag_only_columns=True), + ListSource("weight", [20.5, 22.25]), + ] + for source in built: + _ = source.source_id, source.content_hash(), source.as_table() + assert _provisional_warnings(caught) == [] + + +def _derived_identity(form: str) -> tuple[Any, ...]: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + derived = DERIVED_FORMS[form](_ran_job()) + config = derived.to_config() + config.pop("origin", None) + return ( + derived.source_id, + derived.content_hash().to_string(), + derived.pipeline_hash().to_string(), + config, + ) + + +@pytest.mark.parametrize("form", sorted(DERIVED_FORMS)) +def test_the_mark_changes_no_derived_identity( + monkeypatch: pytest.MonkeyPatch, form: str +) -> None: + """Source id, content hash, pipeline hash and config are those of an unmarked + DerivedSource, in both forms (ITL-1331).""" + marked = _derived_identity(form) + monkeypatch.setattr(DerivedSource, "PROVISIONAL", False) + unmarked = _derived_identity(form) + assert marked == unmarked + + +@pytest.mark.parametrize("form", sorted(DERIVED_FORMS)) +def test_a_derived_source_built_before_a_recording_is_noted_on_every_use( + form: str, +) -> None: + """Built (and read once) before the recording: reading its id, hashes or rows notes + the use, without warning again (ITL-1331).""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + derived = DERIVED_FORMS[form](_ran_job()) + _ = derived.source_id, derived.content_hash(), derived.pipeline_hash() + _ = derived.as_table() + uses: dict[str, Any] = { + "source id": lambda: derived.source_id, + "content hash": derived.content_hash, + "pipeline hash": derived.pipeline_hash, + "rows": derived.as_table, + "iterated": lambda: list(derived.iter_data()), + } + for use, fn in uses.items(): + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + _ = fn() + assert used == {"DerivedSource"}, use + assert _provisional_warnings(caught) == [], use diff --git a/tests/test_hashing/golden/cases.py b/tests/test_hashing/golden/cases.py index 0d90a5959..a30712163 100644 --- a/tests/test_hashing/golden/cases.py +++ b/tests/test_hashing/golden/cases.py @@ -106,20 +106,24 @@ def register(fn: CaseFn) -> CaseFn: def declarable_provisional_names() -> frozenset[str]: - """The names a case may declare provisional: the provisional operators (ITL-1266) - and the provisional library value types, by extension name (the ``provisional`` - list of ``contexts/logical_types.json``; ITL-1324).""" + """The names a case may declare provisional: the provisional operators (ITL-1266), + the provisional sources (ITL-1331) and the provisional library value types, by + extension name (the ``provisional`` list of ``contexts/logical_types.json``; + ITL-1324). No case builds a ``PollingSource`` (ITL-1314): its pins were removed.""" import importlib.resources from orcapod.core.operators.provisional import PROVISIONAL_OPERATORS + from orcapod.core.sources.provisional import PROVISIONAL_SOURCES registration = json.loads( importlib.resources.files("orcapod.contexts") .joinpath("logical_types.json") .read_text() ) - return frozenset(PROVISIONAL_OPERATORS) | frozenset( - registration.get("provisional", []) + return ( + frozenset(PROVISIONAL_OPERATORS) + | frozenset(PROVISIONAL_SOURCES) + | frozenset(registration.get("provisional", [])) ) @@ -1217,10 +1221,12 @@ def schema_location_default_source_ids() -> dict[str, Any]: return out -@case("schema", "derived_source_tags_as_data") +@case("schema", "derived_source_tags_as_data", provisional=("DerivedSource",)) def schema_derived_source_tags_as_data() -> dict[str, Any]: """Pin a source derived from another source with a tag also offered as data (ITL-939). + Provisional: ``DerivedSource`` is (ITL-1331). + Two variants, each with its own source id, as this form requires (ITL-1313): by position, and with a ``record_id_column``. @@ -1252,6 +1258,37 @@ def schema_derived_source_tags_as_data() -> dict[str, Any]: return out +@case("schema", "key_policy_identity", provisional=("DerivedSource",)) +def schema_key_policy_identity_derived() -> dict[str, Any]: + """The ``derived_tags_as_data`` entries of ``key_policy_identity``: provisional, as + ``DerivedSource`` is (ITL-1331). Its origin is the ``arrow_table`` variant's source.""" + from orcapod.core.sources import ArrowTableSource, DerivedSource + + out: dict[str, Any] = {} + for variant, key in {"position": None, "key": "subject"}.items(): + arrow = ArrowTableSource( + _builder_table(), + tag_columns=["subject"], + record_id_columns=key, + source_id="golden_keys", + data_context=_ctx(), + tag_only_columns=True, + ) + derived = DerivedSource( + arrow, + tags_as_data={"subject": "subject_value"}, + source_id="golden_keys_derived", + record_id_columns=key, + ) + out[f"derived_tags_as_data.{variant}.content_hash"] = ( + derived.content_hash().to_string() + ) + out[f"derived_tags_as_data.{variant}.pipeline_hash"] = ( + derived.pipeline_hash().to_string() + ) + return out + + @case("schema", "key_policy_identity") def schema_key_policy_identity() -> dict[str, Any]: """Pin sources that differ only in key policy (developer, November 16, 2026, ITL-1154). @@ -1270,7 +1307,6 @@ def schema_key_policy_identity() -> dict[str, Any]: from orcapod.core.sources import ( ArrowTableSource, - DerivedSource, ListSource, SQLiteTableSource, ) @@ -1292,13 +1328,6 @@ def pin(variant: str, source: Any) -> None: tag_only_columns=True, ) pin(f"arrow_table.{variant}", arrow) - derived = DerivedSource( - arrow, - tags_as_data={"subject": "subject_value"}, - source_id="golden_keys_derived", - record_id_columns=key, - ) - pin(f"derived_tags_as_data.{variant}", derived) for variant, key in {"position": None, "key": "element_index"}.items(): listed = ListSource( "value", @@ -2591,13 +2620,10 @@ def pipeline_default_source_ids() -> dict[str, Any]: A source built with no ``source_id`` is named ``::``; a source made with ``node.as_source()`` is named - ``derived::``. + ``derived::`` (provisional: ``pipeline_default_source_ids_as_source``). """ import polars as pl - from orcapod import PipelineJob - from orcapod.databases import InMemoryArrowDatabase - from orcapod.operators import Join from orcapod.sources import ( ArrowTableSource, DataFrameSource, @@ -2621,7 +2647,18 @@ def pipeline_default_source_ids() -> dict[str, Any]: for name, source in sources.items(): out[f"{name}.source_id"] = source.source_id out[f"{name}.content_hash"] = source.content_hash().to_string() + return out + +@case("pipeline", "default_source_ids", provisional=("DerivedSource",)) +def pipeline_default_source_ids_as_source() -> dict[str, Any]: + """The ``as_source[...]`` entries of ``default_source_ids``: provisional, as + ``DerivedSource`` is (ITL-1331).""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + from orcapod.operators import Join + + out: dict[str, Any] = {} job = PipelineJob( name="golden_default_source_ids", database=InMemoryArrowDatabase() ) diff --git a/tests/test_hashing/golden/test_golden_store.py b/tests/test_hashing/golden/test_golden_store.py index 6ee7aff28..1e3748160 100644 --- a/tests/test_hashing/golden/test_golden_store.py +++ b/tests/test_hashing/golden/test_golden_store.py @@ -1283,7 +1283,9 @@ def fn() -> dict[str, Any]: def test_a_case_building_a_polling_source_is_refused( monkeypatch: pytest.MonkeyPatch, source_ids: tuple[str, ...] ) -> None: - """A provisional source is never pinned, and a case cannot declare it (ITL-1314).""" + """A case that builds a PollingSource undeclared is refused (ITL-1314). A provisional + source is declarable since ITL-1331, so a declaring case would be provisional; no + repository case declares one (``test_the_repository_cases_declare_exactly_the_measured_cases``).""" monkeypatch.setitem( cases._CASES, "semantic", @@ -1298,8 +1300,8 @@ def test_a_case_building_a_polling_source_is_refused( "semantic", [("polling", _building_polling_sources(*source_ids), ("PollingSource",))], ) - with pytest.raises(ValueError, match=re.escape("declares ['PollingSource']")): - _ = cases.compute_group_kinds("semantic") + _, provisional = cases.compute_group_kinds("semantic") + assert provisional == frozenset({"polling.value"}) def _reading_built_polling_sources(read: str, *source_ids: str) -> Any: @@ -1358,9 +1360,10 @@ def test_a_case_declaring_an_unknown_provisional_name_is_refused( def test_the_repository_cases_declare_exactly_the_measured_cases() -> None: - """The cases that depend on a provisional operator or library value type, measured - for ITL-1266, ITL-1279 and ITL-1324 (docs/dev/scripts/itl_1279/measure_relocation.py), - and no other. A split case is listed once: its provisional part.""" + """The cases that depend on a provisional operator, source or library value type, + measured for ITL-1266, ITL-1279, ITL-1324 and ITL-1331 + (docs/dev/scripts/itl_1279/measure_relocation.py), and no other. A split case is + listed once: its provisional part. No case declares a ``PollingSource`` (ITL-1314).""" declared = { (group, name): names for group, registered in cases._CASES.items() @@ -1398,6 +1401,9 @@ def test_the_repository_cases_declare_exactly_the_measured_cases() -> None: ("pipeline", "add_tags"): ("AddTags",), ("pipeline", "group_by_arrangement"): ("GroupBy",), ("pipeline", "group_by_nan_keys"): ("GroupBy",), + ("schema", "derived_source_tags_as_data"): ("DerivedSource",), + ("schema", "key_policy_identity"): ("DerivedSource",), + ("pipeline", "default_source_ids"): ("DerivedSource",), ("torch", "value"): torch, ("torch", "type"): torch, ("torch", "single_field"): torch, @@ -1418,6 +1424,7 @@ def test_the_provisional_library_value_types_are_declarable() -> None: cases.TORCH_TENSOR, } <= names assert {"PolarsFilter", "GroupBy", "MergeJoin"} <= names + assert {"DerivedSource", "PollingSource"} <= names def _hashing(*values: Any) -> Any: @@ -1464,3 +1471,167 @@ def test_a_case_declaring_the_library_value_types_it_hashes_is_provisional( values, provisional = cases.compute_group_kinds("semantic") assert set(values) == {"lib.v0", "lib.v1", "plain.v0", "plain.v1"} assert provisional == frozenset({"lib.v0", "lib.v1"}) + + +# --------------------------------------------------------------------------- +# DerivedSource is provisional (ITL-1331) +# --------------------------------------------------------------------------- + + +def _derived_origin() -> Any: + from orcapod.sources import ArrowTableSource + + table = pa.table( + { + "subject": ["s1", "s2"], + "session": [1, 2], + "age": [2, 4], + "weight": [20.5, 22.25], + } + ) + return ArrowTableSource( + table, + tag_columns=["subject", "session"], + tag_only_columns=True, + source_id="golden_derived_origin", + ) + + +def _derived(mapping: dict[str, str]) -> Any: + from orcapod.core.sources import DerivedSource + + return DerivedSource(_derived_origin(), tags_as_data=mapping, source_id="copied") + + +def _plain_derived() -> Any: + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + from orcapod.operators import SelectDataColumns + + job = PipelineJob(name="golden_derived", database=InMemoryArrowDatabase()) + with job: + SelectDataColumns(["age", "weight"])(_derived_origin(), label="picked") + job.run() + return job.nodes["picked"].as_source() + + +_AS_DATA = {"session": "session_value", "subject": "subject_value"} + +# Built inside the case: both forms, the mapping in two orders. +_DERIVED_IN_CASE: dict[str, Any] = { + "tags_as_data": lambda: {"id": _derived(_AS_DATA).source_id}, + "tags_as_data reversed": lambda: { + "id": _derived(dict(reversed(list(_AS_DATA.items())))).source_id + }, + "plain": lambda: {"id": _plain_derived().source_id}, +} + + +@functools.cache +def _prebuilt_derived() -> dict[str, Any]: + """Both forms built, hashed and read before any case is recorded.""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ProvisionalHashWarning) + built = {"tags_as_data": _derived(_AS_DATA), "plain": _plain_derived()} + for source in built.values(): + _ = source.source_id, source.content_hash(), source.pipeline_hash() + _ = source.as_table() + return built + + +def _reading(form: str, read: str) -> Any: + def fn() -> dict[str, Any]: + source = _prebuilt_derived()[form] + if read == "source_id": + return {"v": source.source_id} + if read == "rows": + return {"v": source.as_table().num_rows} + return {"v": getattr(source, read)().to_string()} + + return fn + + +_DERIVED_READS = [ + (form, read) + for form in ("plain", "tags_as_data") + for read in ("source_id", "content_hash", "pipeline_hash", "rows") +] + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +@pytest.mark.parametrize("built", sorted(_DERIVED_IN_CASE)) +def test_a_case_building_a_derived_source_undeclared_is_refused( + monkeypatch: pytest.MonkeyPatch, built: str +) -> None: + fn = _DERIVED_IN_CASE[built] + monkeypatch.setitem(cases._CASES, "schema", [("derived", fn, ())]) + with pytest.raises( + ValueError, match=re.escape("uses the provisional ['DerivedSource']") + ): + _ = cases.compute_group_kinds("schema") + monkeypatch.setitem(cases._CASES, "schema", [("derived", fn, ("DerivedSource",))]) + _, provisional = cases.compute_group_kinds("schema") + assert provisional == frozenset({"derived.id"}) + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +@pytest.mark.parametrize(("form", "read"), _DERIVED_READS) +def test_a_case_reading_a_derived_source_built_before_it_is_refused( + monkeypatch: pytest.MonkeyPatch, form: str, read: str +) -> None: + _ = _prebuilt_derived() + fn = _reading(form, read) + monkeypatch.setitem(cases._CASES, "schema", [("derived", fn, ())]) + with pytest.raises( + ValueError, match=re.escape("uses the provisional ['DerivedSource']") + ): + _ = cases.compute_group_kinds("schema") + monkeypatch.setitem(cases._CASES, "schema", [("derived", fn, ("DerivedSource",))]) + _, provisional = cases.compute_group_kinds("schema") + assert provisional == frozenset({"derived.v"}) + + +def _pinned_entry_names() -> dict[str, set[str]]: + """group -> every entry name pinned in a frozen or provisional file.""" + folder = store.golden_folder( + store.PROJECT_ROOT, + store.read_json(store.manifest_path(store.PROJECT_ROOT, VERSION)), + ) + names: dict[str, set[str]] = {} + for path in sorted(folder.rglob("*.json")): + names.setdefault(path.stem.split("-")[0], set()).update(store.read_json(path)) + return names + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +def test_split_cases_keep_every_entry_name() -> None: + """A case registered twice (its provisional part declared) computes exactly the + entry names pinned for it, each from one registration only (ITL-1279, ITL-1324, + ITL-1331).""" + cases.register_logical_classes() + pinned = _pinned_entry_names() + split = { + (group, name) + for group, registered in cases._CASES.items() + for name in {n for n, _, _ in registered} + if sum(1 for n, _, _ in registered if n == name) > 1 + } + assert split == { + ("semantic", "value"), + ("semantic", "type"), + ("schema", "single_field"), + ("schema", "key_policy_identity"), + ("arrow", "extension_no_values"), + ("pipeline", "join_key_nullability"), + ("pipeline", "default_source_ids"), + } + for group, name in sorted(split): + parts = [ + {f"{name}.{key}" for key in fn()} + for n, fn, _ in cases._CASES[group] + if n == name + ] + assert all(parts), (group, name) + assert not set.intersection(*parts), (group, name) + expected = {e for e in pinned[group] if e.startswith(f"{name}.")} + assert set.union(*parts) == expected, (group, name) From 39fa5934bcbdf9eac620b81429c8ce659727fb38 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 21:26:54 -0800 Subject: [PATCH 5/6] test(golden): relocate the provisional entries, values unchanged (ITL-1279, ITL-1324, ITL-1331) generate_golden_hashes.py --relocate after merging main 61d1783e: 389 entries move from the frozen files to the provisional files (229 of the provisional operators, 128 of the provisional library value types, 32 of DerivedSource). Proof against 61d1783e over the union of frozen and provisional files (docs/dev/scripts/itl_1279/relocation_proof.py --ref 61d1783e): 1669 entries before and after; 0 changed, 0 removed, 0 added. The manifest changes only in golden: the digests of the edited files in the open revisions and the provisional listing. Refs ITL-1279, ITL-1324, ITL-1331 Co-Authored-By: Claude Opus 5.5 --- src/orcapod/contexts/data/v1.json | 28 +- .../test_hashing/golden/data/v1/arrow-01.json | 10 - .../golden/data/v1/datagram-01.json | 65 ---- .../golden/data/v1/pipeline-01.json | 97 ------ .../golden/data/v1/pipeline-02.json | 201 ------------ .../golden/data/v1/provisional/arrow.json | 12 + .../golden/data/v1/provisional/datagram.json | 67 ++++ .../golden/data/v1/provisional/pipeline.json | 298 ++++++++++++++++++ .../golden/data/v1/provisional/schema.json | 48 +++ .../golden/data/v1/provisional/semantic.json | 30 +- .../golden/data/v1/provisional/torch.json | 35 ++ .../golden/data/v1/schema-01.json | 46 --- .../golden/data/v1/semantic-01.json | 28 -- .../test_hashing/golden/data/v1/torch-01.json | 36 +-- 14 files changed, 506 insertions(+), 495 deletions(-) create mode 100644 tests/test_hashing/golden/data/v1/provisional/arrow.json create mode 100644 tests/test_hashing/golden/data/v1/provisional/datagram.json create mode 100644 tests/test_hashing/golden/data/v1/provisional/schema.json create mode 100644 tests/test_hashing/golden/data/v1/provisional/torch.json diff --git a/src/orcapod/contexts/data/v1.json b/src/orcapod/contexts/data/v1.json index 46591f6de..40a07d2fa 100644 --- a/src/orcapod/contexts/data/v1.json +++ b/src/orcapod/contexts/data/v1.json @@ -233,29 +233,33 @@ "date": "2026-11-20", "release": null, "added": { - "arrow-01.json": "c66fa55619178f2631d04232555cd58059813e97e9ecd2b9de9e63699e60c964", - "datagram-01.json": "598d4a2851819d76ba674e189222e61733ca1861ca82a59e990a8ee5e1b0a7b3", - "pipeline-01.json": "86098fcf6f982fccc61ee862fc1219d5270c453ffd9b3a9730883c36f086c2e1", - "schema-01.json": "bd90eb9aca35c43abb244e9c2c3e5e3fac5e1cffb42bd2734b46420c960eeb98", - "semantic-01.json": "973a97cd3d74f558910b5854dce773fe5aa38a4df96be88ef10e5e6504ffe73d", - "torch-01.json": "af2e8b68d66dffaa37e1d0ad75acd42f595d65b9fae00ddcde81bf9e13a265c8" + "arrow-01.json": "3f213f4853cc85a49c5266215d30706da493cdf3b38675ef850ff9865ee54095", + "datagram-01.json": "28e69bbfeb88584d42fe4b0182b7978cf70bab392b0451353cac3e4dc38bff62", + "pipeline-01.json": "899666fe65e100d7fb80e13f5df072583b701c0931e93ca337ad783253df065c", + "schema-01.json": "2aa161b2ebc840cee7ee8dbfe3abc2ca4945ee0594b7a6c04f246c7dac9e6e20", + "semantic-01.json": "3784a1353e9c818f57debc0c26f65fc1622e14e22f9004187a312b1c37033254", + "torch-01.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356" }, "previous": null, - "digest": "6116aeac2dccf9cb1c8a6e28539740b156a59bc33ef093df836c5cf1548647c8" + "digest": "5d633eb949e4214737b0f4240bebaa8d93210a2c9366b467e0d8dbc1fc2ae022" }, { "date": "2026-11-20", "release": null, "added": { - "pipeline-02.json": "61dff22a05ff342eb5163d2f364ace10690a03d3a86976dc388de49af26f8707" + "pipeline-02.json": "2f8eb8d09b242e2591214d87c0fe2d01d8c519b4c442ebb0c83ed03ad5b1d1ab" }, - "previous": "6116aeac2dccf9cb1c8a6e28539740b156a59bc33ef093df836c5cf1548647c8", - "digest": "1f7946e545f04a4b749d2e4fca74a917fc1c825c802d911ae9395d16bcd6c949" + "previous": "5d633eb949e4214737b0f4240bebaa8d93210a2c9366b467e0d8dbc1fc2ae022", + "digest": "d1941dd6e57a752711db202048e92e0078056d006407f684884158039dd2fbaa" } ], "provisional": { - "pipeline.json": "42d588512ad1ba11acf6725f8424e28bd85c7a75c0dda5ac129d79e4c07a3322", - "semantic.json": "0adfab60f8ced647d841d0a74a0603096b00fab310a8f4686246309d5fb39d3d" + "arrow.json": "bca6da610591168e3cd29a8aa294779a427456ba8b61374128e9a1d4d1db9a41", + "datagram.json": "e644e99473b2e6c510d13fc80c2c9cdb1807093c7bf7e9b2a842612ab79c6061", + "pipeline.json": "e39529caae037714c75fbe6fb5be5fd61342a8a6711489c644df760d30c5ff9c", + "schema.json": "09647e5db2b00bb7e827d2e88cd7c034ec7e0c1548012aadcf3d62d9efa59310", + "semantic.json": "a046be33210299869770043468c2ce5fab05ee32125e7e7e7bc6eb66d37a49b5", + "torch.json": "af2e8b68d66dffaa37e1d0ad75acd42f595d65b9fae00ddcde81bf9e13a265c8" } }, "changes": [ diff --git a/tests/test_hashing/golden/data/v1/arrow-01.json b/tests/test_hashing/golden/data/v1/arrow-01.json index 11fddeeb9..85e5c0cd6 100644 --- a/tests/test_hashing/golden/data/v1/arrow-01.json +++ b/tests/test_hashing/golden/data/v1/arrow-01.json @@ -3,22 +3,16 @@ "dict_order.kv.unsorted": "arrow_v1:000002d4f20c961f702578b0f64808c20be5e461fedcdce533ef37aa4bd81b29b6fca7", "dict_order.pairs.ab": "arrow_v1:00000219aa4c4bd32e76ef40f4e589adcd452740daf41aacd46dc970a97bdd54310d03", "dict_order.pairs.ba": "arrow_v1:0000022a3837a05e7440f8093807593ef22de9d217dcb6cfb431458789ce7587325d6e", - "extension_no_values.all_null.dataframe": "arrow_v1:0000025185ba76517a22a9427612c3fa5e49a3cd5c800c71cff83fb474c8a39dd78516", "extension_no_values.all_null.directory": "arrow_v1:000002453096b2e240ea4cef0a5aea8993c2ee21acc8abb5cb7cd2f5bf2c042698e864", "extension_no_values.all_null.file": "arrow_v1:000002891dfab8553a43b65eb4cd139f5faba11b55d68fa51797a2ebfdaf75f00343f3", "extension_no_values.all_null.list_of_file": "arrow_v1:0000024edd8eb0172b600ae311dddc6bd8d35609fb3f4244f790110758ba64adcd3581", - "extension_no_values.all_null.ndarray": "arrow_v1:0000023e4d6199067f84c55c41d5fa5796bd57ed8157e09cf79c9452d2812b6363ae44", "extension_no_values.all_null.plain_large_binary": "arrow_v1:000002dc18d0b04ad42a426a7a3c8a50b9d079af29dfb8f536f96478ebfb60ae3eeb8c", - "extension_no_values.all_null.series": "arrow_v1:0000025699fe402adca996592df2b00e11d2993ee3c59bb45e849c9928d322e129a951", "extension_no_values.all_null.set_of_uuid": "arrow_v1:000002d107b7c388d6db23970fdba97004867fb1c91c4d44595d6c4a42a1525173e879", "extension_no_values.all_null.uuid": "arrow_v1:00000225a16d604be3cec9262571e1601c2f3a92f3ed33196c15dab6f853426d0d2639", - "extension_no_values.zero_rows.dataframe": "arrow_v1:000002bc85ae91fb30f91afb81787c6bd3fa21fb793064c9f00ed33d361d2d19ac2c9b", "extension_no_values.zero_rows.directory": "arrow_v1:0000024527faf5c862df2ef09117ba497b741560c9840298e802dadad9811675c7a157", "extension_no_values.zero_rows.file": "arrow_v1:0000027bbabfd6434816fdb0a6448c16c678a845b4ee8ddd7cc703833d3fd8075046e9", "extension_no_values.zero_rows.list_of_file": "arrow_v1:0000023fa05734c245d297bcc9274c95c0d0950b87ec38db2dfba2fe8eb91ac36ff13f", - "extension_no_values.zero_rows.ndarray": "arrow_v1:0000022380492b0ec32f02eaf62e1fb8baa08f23fbeda5a5df32792dbaa7ba5c22d1d9", "extension_no_values.zero_rows.plain_large_binary": "arrow_v1:000002cb490ae7e0f6088c5ab7a09d82cce86d9b0e9a11a71e782e1e26317bfe31e0fa", - "extension_no_values.zero_rows.series": "arrow_v1:0000029bedd709e27087807701315dbcca9215a4fc2a118d2f9175d7e5cc6036f2d2ba", "extension_no_values.zero_rows.set_of_uuid": "arrow_v1:00000280c89deac972674dea9af80d552040c87fb7932fcbc2abc5b03d25e0d82ff752", "extension_no_values.zero_rows.uuid": "arrow_v1:00000246b084d700fc4cc5fdb8028d83fda43e484f3fd4e28187e4bbc40b15fd988895", "extension_schema.extension.canonical_fixed_shape_tensor": "arrow_v1:0000022df2fb43d6457645dea99103a5ee4ca34c1728ef387685dbb73c58a43fc6a002", @@ -31,10 +25,6 @@ "extension_table.extension.path": "arrow_v1:0000024a4e1f6fbf6bf6e304bd4e30dd6b085835d77a59a15a949f6d2af428af823e2a", "extension_table.extension.unregistered_passthrough": "arrow_v1:000002b9c5f64eb011d128c21fa0570cab2bf34915277103a843c3d2174bb14c4ad158", "extension_table.extension.uuid": "arrow_v1:0000028252a1f0b3b7453bbfdd1115faff0e8b4ac20bb7cdf34504757b89bac792ea70", - "polars_extension_no_values.all_null.dataframe": "arrow_v1:000002002479ebedc867c8831d99eaf4821e9c4e8c4679726ab7a7f1b37946ddc5d6f3", - "polars_extension_no_values.all_null.series": "arrow_v1:00000240b2c2cd8596cff8213da703e3dbbe903cbb32466a21ee6286e6d425f0207b9c", - "polars_extension_no_values.zero_rows.dataframe": "arrow_v1:000002311e399e27347b47d6644b886184956bbaeea9f077ecbb658ddaa90abb7bb723", - "polars_extension_no_values.zero_rows.series": "arrow_v1:000002f609a54331f5b3bfab74b2220c34dbc708a42c768f79fd2487b0f2e966b41935", "schema.bool": "arrow_v1:00000292f4b85e8651fe4c797b8057205fb5aa89dd8420bb6ecef56e70f91c23b06718", "schema.bool.chunked": "arrow_v1:00000292f4b85e8651fe4c797b8057205fb5aa89dd8420bb6ecef56e70f91c23b06718", "schema.collision.list_lengths_a": "arrow_v1:00000217b4f541f59698108a9542f81fb4551d5ed9a636f7d7e9c91e44b9ffacb1a244", diff --git a/tests/test_hashing/golden/data/v1/datagram-01.json b/tests/test_hashing/golden/data/v1/datagram-01.json index 876037ce9..657b57de3 100644 --- a/tests/test_hashing/golden/data/v1/datagram-01.json +++ b/tests/test_hashing/golden/data/v1/datagram-01.json @@ -125,18 +125,6 @@ "_tag_source_id::ade3c412796b16c1d9804e460ee74f43d1b140cda0fe582e0da101c1ac5f5e35", "_tag_record_id::ade3c412796b16c1d9804e460ee74f43d1b140cda0fe582e0da101c1ac5f5e35" ], - "dataframe.content_hash": "semantic_v1:a7a9576e34dfa6a9a6ada018df8e76cf893fc4c965478291ccd7c61c4f5617b7", - "dataframe.pipeline_hash": "semantic_v1:8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c", - "dataframe.row[{\"k\":\"r1\"}]._tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "row_0", - "dataframe.row[{\"k\":\"r1\"}]._tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "golden_dataframe", - "dataframe.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000022cd5a960b5404d8a5a0e8ca1d33dec1b1bb1271d99c69fc5f1601a2bfa57a045", - "dataframe.row[{\"k\":\"r2\"}]._tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "row_1", - "dataframe.row[{\"k\":\"r2\"}]._tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "golden_dataframe", - "dataframe.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002f96baa41d284be17280d30a874fb0d60a2b87bf9a267839226f487e8c43e71f2", - "dataframe.system_tag_columns": [ - "_tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c", - "_tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c" - ], "dict_order.int_keys.content_hash": "semantic_v1:13ee7eb9767f2adb94efef87b06c1cc485919736a086e592b2f0b38eb007c085", "dict_order.int_keys.pipeline_hash": "semantic_v1:4ea36d4c074447c7fb0c07c6c03bb3ee65cc9a297d7b2618a9148778b67cc9c7", "dict_order.int_keys.row[{\"k\":\"r0\"}]._tag_record_id::4ea36d4c074447c7fb0c07c6c03bb3ee65cc9a297d7b2618a9148778b67cc9c7": "row_0", @@ -185,18 +173,6 @@ "_tag_source_id::09138f24af8412bca94888fe727e95a597af58bfb220a4ce8e922d129b2c1dfc", "_tag_record_id::09138f24af8412bca94888fe727e95a597af58bfb220a4ce8e922d129b2c1dfc" ], - "ndarray.content_hash": "semantic_v1:055f5e3bdb5ec852b95c7c826f126dc4b89857202e505c46becce71c8fb616f7", - "ndarray.pipeline_hash": "semantic_v1:7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e", - "ndarray.row[{\"k\":\"r1\"}]._tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "row_0", - "ndarray.row[{\"k\":\"r1\"}]._tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "golden_ndarray", - "ndarray.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000021d3f4daa4e92c343b184b4a56c92dc854d68345ffa51f085077d8edadf2a2955", - "ndarray.row[{\"k\":\"r2\"}]._tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "row_1", - "ndarray.row[{\"k\":\"r2\"}]._tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "golden_ndarray", - "ndarray.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:00000203ec0ae4b9a347cfa41dca36122c606b914c8e39770e5101d8e32d4fbdfd5f52", - "ndarray.system_tag_columns": [ - "_tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e", - "_tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e" - ], "nested.content_hash": "semantic_v1:438ef6b27a6d10ee7b0630803c012495e67ececba4ef7d77e5cf30f1d15c4e28", "nested.pipeline_hash": "semantic_v1:30cd395433196ee13ae963da4ddeed7bdc72cd7fe5a4bdc603c65a6cd1c73452", "nested.row[{\"k\":\"r1\"}]._tag_record_id::30cd395433196ee13ae963da4ddeed7bdc72cd7fe5a4bdc603c65a6cd1c73452": "row_0", @@ -233,35 +209,6 @@ "_tag_source_id::72f2e9a98ffb5189e3f191d63f031f3cd8454337f5eaf913132ddaeb03612243", "_tag_record_id::72f2e9a98ffb5189e3f191d63f031f3cd8454337f5eaf913132ddaeb03612243" ], - "polars_data_hash.empty_with_schema": "arrow_v1:000002d9112470c27f707ac0f7eb6f992d18e03a46b80bdf1b270115b55010c706e05a", - "polars_data_hash.nested_and_categorical": "arrow_v1:000002802feecb7e28723e67ef58702803a4a6afb1360cf398a13cf1ddb7fa9b4387fc", - "polars_data_hash.nulls_and_temporal": "arrow_v1:0000023f814a933ffd61a3ae31cb85a5c6be6ad42e2b1b9dc1bb946d572799cd5a66ae", - "polars_data_hash.series": "arrow_v1:000002a8cabb92adcf6e6346c953872a8afd4e57498cbc9f1a8181ec0287ff49a6ff1f", - "polars_data_hash.simple": "arrow_v1:0000028764c304ac871a29a42bfc1b88695820a30f42b7a0507b43f39c559675f81839", - "polars_dataframe.content_hash": "semantic_v1:6e3864850fa65c99695c5b52fbd6206c12799806e4b7009859f779b9c469cc3e", - "polars_dataframe.pipeline_hash": "semantic_v1:71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10", - "polars_dataframe.row[{\"k\":\"r1\"}]._tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "row_0", - "polars_dataframe.row[{\"k\":\"r1\"}]._tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "golden_polars_dataframe", - "polars_dataframe.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000023af93c03df5d4ce9706c8a01857e231bed3b0544ff0616ab60e0761aff27ab42", - "polars_dataframe.row[{\"k\":\"r2\"}]._tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "row_1", - "polars_dataframe.row[{\"k\":\"r2\"}]._tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "golden_polars_dataframe", - "polars_dataframe.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002fd197fcd2ee23a3ea164bb220bedde1c4828a6bd45d9c504ba063317d813e98d", - "polars_dataframe.system_tag_columns": [ - "_tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10", - "_tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10" - ], - "polars_series.content_hash": "semantic_v1:c9ef6b9d60f1ec37bcdd77bd376ac46ac459e4fb0b075b413864808c8eb98d27", - "polars_series.pipeline_hash": "semantic_v1:3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951", - "polars_series.row[{\"k\":\"r1\"}]._tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "row_0", - "polars_series.row[{\"k\":\"r1\"}]._tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "golden_polars_series", - "polars_series.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:00000296532a3b0fd23c4fb8199736b921b70ed902f22e609554aea763583debe0b86a", - "polars_series.row[{\"k\":\"r2\"}]._tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "row_1", - "polars_series.row[{\"k\":\"r2\"}]._tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "golden_polars_series", - "polars_series.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002f738c7942bb078b92e25f86a8d44dabc489523bb849359b401cf3df8e93ab40a", - "polars_series.system_tag_columns": [ - "_tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951", - "_tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951" - ], "pydantic.content_hash": "semantic_v1:ebbf1df91531320bc238dfc44d4f01bee66ae41152a6a8cc5f39f18217d4248c", "pydantic.pipeline_hash": "semantic_v1:08a8ba41a54cbf819c8d3c2dc67bdede4f406c05dca3adae04c11b57b50cb8f7", "pydantic.row[{\"k\":\"r1\"}]._tag_record_id::08a8ba41a54cbf819c8d3c2dc67bdede4f406c05dca3adae04c11b57b50cb8f7": "row_0", @@ -406,18 +353,6 @@ "_tag_source_id::4e440b885c9b13d0204dc7622879a6c4f85bfbf33f7b5ddcf8765ab7c0bfcaff", "_tag_record_id::4e440b885c9b13d0204dc7622879a6c4f85bfbf33f7b5ddcf8765ab7c0bfcaff" ], - "structural_with_array.content_hash": "semantic_v1:254cb945b734e22a0052aa88047f828199a1c8ed4b26c89b8c9580abe6b91b6f", - "structural_with_array.pipeline_hash": "semantic_v1:bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b", - "structural_with_array.row[{\"k\":\"r1\"}]._tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "row_0", - "structural_with_array.row[{\"k\":\"r1\"}]._tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "golden_structural_with_array", - "structural_with_array.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:00000233b4f923a391a10f061af0708c403d46114d7a4d815cd23d8e6c054db99e1668", - "structural_with_array.row[{\"k\":\"r2\"}]._tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "row_1", - "structural_with_array.row[{\"k\":\"r2\"}]._tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "golden_structural_with_array", - "structural_with_array.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002fb57ad80c23a7d4c1ef8d73edd5092a3e2b7da31b755c874aedfd40e7e006369", - "structural_with_array.system_tag_columns": [ - "_tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b", - "_tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b" - ], "uuid.content_hash": "semantic_v1:df02d406ca86304376f5f92ef9f9c10063f2da47025764b8fcdd43409c9df4e8", "uuid.pipeline_hash": "semantic_v1:bcec35f4626222ee26fc557cce055a6c838eb349382b2aedc559c9b45e3c0d9c", "uuid.row[{\"k\":\"r1\"}]._tag_record_id::bcec35f4626222ee26fc557cce055a6c838eb349382b2aedc559c9b45e3c0d9c": "row_0", diff --git a/tests/test_hashing/golden/data/v1/pipeline-01.json b/tests/test_hashing/golden/data/v1/pipeline-01.json index 68998f269..91b413221 100644 --- a/tests/test_hashing/golden/data/v1/pipeline-01.json +++ b/tests/test_hashing/golden/data/v1/pipeline-01.json @@ -1,16 +1,4 @@ { - "batch.content_hash": "semantic_v1:da1bfcbda8e0e1fe5505f4877cf58c98222ad2f80dc62aad03159b3954f7fe10", - "batch.pipeline_hash": "semantic_v1:f31d11199ee9107bee28d14765e91a0dc35a611eb4c0935b2442abcf64e4d818", - "batch.row[{\"subject\":[\"s1\",\"s2\"]}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:9be3abf473e589e83e5229ad28484593860af85bd0d2592ca879add89a656125", - "batch.row[{\"subject\":[\"s1\",\"s2\"]}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:bcee0cac2ac80330f73416b8d8e249dd58f3b8c7089b28d6539f1550e1542eee", - "batch.row[{\"subject\":[\"s1\",\"s2\"]}].data_hash": "arrow_v1:0000020b638d3ccc763f2a88e2ade9b759bb8641c55073185d4839047a3fc91276dc7d", - "batch.row[{\"subject\":[\"s3\"]}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:80636a45b1ecdbb1a1d1cdb4956ebb5e72dcb98b66c03eda55a06a7904e8e683", - "batch.row[{\"subject\":[\"s3\"]}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:9004bfa909932fc723ffc075ce862a93fa8b315fc7efc50002e6a9450acaabbb", - "batch.row[{\"subject\":[\"s3\"]}].data_hash": "arrow_v1:000002928bbf5d31fadf74ea3118af85c0d2273f77d53274f492e63a955520e4fac208", - "batch.system_tag_columns": [ - "_tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373", - "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373" - ], "column_selection.drop_data.content_hash": "semantic_v1:cb5e7ffa749a8b90ccea47f8f158ba0e81f7beb0101937cad72d165f95ebb96b", "column_selection.drop_data.pipeline_hash": "semantic_v1:2c81ec17e83926b56c32be55e61b153a761c78d0f980ad22afb15eb69e28ed26", "column_selection.drop_data.row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "row_0", @@ -71,7 +59,6 @@ ], "default_source_ids.arrow_table.content_hash": "semantic_v1:770f640770d0e5c3ae1b2e6a89ddeb4488a8d7a56a482f35b7db5df766497342", "default_source_ids.arrow_table.source_id": "arrow_table:arrow_v1:000002e12eafa1dc72203ca9da1ca5d064031683cf089f47bad40744ecd2c923d0fde3", - "default_source_ids.as_source[operator_node].source_id": "derived:semantic_v1:82f3820c8ac3225f4b9c61f2c018d81320524745fd9362276e9b7dfdb898affa", "default_source_ids.data_frame.content_hash": "semantic_v1:a17f8e5a4188d34ac948073a2ec049c58bc3da0e85d31294706968034cbf7732", "default_source_ids.data_frame.source_id": "data_frame:arrow_v1:000002fe394bbf12e2bfee45d18a67db55a94cda0f0878356d0686fe6ffb750d3c4feb", "default_source_ids.dict.content_hash": "semantic_v1:76434e706fb207ec843387c301c12d14657b0a2d136074a242af7e63c3b27b3d", @@ -211,42 +198,6 @@ "_tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f", "_tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f" ], - "group_by.content_hash": "semantic_v1:e39fd80bf63f3549d59902281171f1d94fba5202fad99b7b29eb1a48d4e31364", - "group_by.pipeline_hash": "semantic_v1:a54462063efcb67b3d3df58840d7b63d5d5b6d2d772efc154655859fe7588400", - "group_by.row[{\"cohort\":\"a\"}]._tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:9be3abf473e589e83e5229ad28484593860af85bd0d2592ca879add89a656125", - "group_by.row[{\"cohort\":\"a\"}]._tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:11316416683632ce9125c3a3ab58c085c03b46bc8b8b14767b70ad33d90d621f", - "group_by.row[{\"cohort\":\"a\"}].data_hash": "arrow_v1:000002b50de37e741a154b01d9b0492bc3f3b6db1044edf8abee33e6e895037fdef81e", - "group_by.row[{\"cohort\":\"b\"}]._tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:80636a45b1ecdbb1a1d1cdb4956ebb5e72dcb98b66c03eda55a06a7904e8e683", - "group_by.row[{\"cohort\":\"b\"}]._tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:0e3b86a9fbf8566e5a1f4e53b501f566da56327a6d0ecf2e78f2288f76167dd7", - "group_by.row[{\"cohort\":\"b\"}].data_hash": "arrow_v1:0000026bc48a0e74f57c3f5968efabefb44d0a2364abcba5d4b2237bb1a27ffe993d6c", - "group_by.system_tag_columns": [ - "_tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b", - "_tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b" - ], - "index_pick.index.content_hash": "semantic_v1:dc992a4f7c6ee172a8dd9cef2866c9c083eeb923b471dfeadde74f20c6670a1e", - "index_pick.index.pipeline_hash": "semantic_v1:d6f27ebb144aa642d4cf39ae4e7b013b4542c3996a2b8424adbad6523108be5b", - "index_pick.index.row[{\"subject\":\"s1\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_0", - "index_pick.index.row[{\"subject\":\"s1\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", - "index_pick.index.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002948e686a8a041a7323c3474c6d7861e4536e57ddb8096704f395daecca80e742", - "index_pick.index.row[{\"subject\":\"s2\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_1", - "index_pick.index.row[{\"subject\":\"s2\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", - "index_pick.index.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:000002ecef3b9df41f6928426d3a063d9eb64485f7e78fc72ef50dad5b3c06bd8aee3a", - "index_pick.index.system_tag_columns": [ - "_tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd", - "_tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd" - ], - "index_pick.pick.content_hash": "semantic_v1:76f12a3ce6745bd0467e31fd538a9700d79921048b67b8982c88788549773654", - "index_pick.pick.pipeline_hash": "semantic_v1:86aaab059ebda8378b7262393cf36b62d6fa945ee4d0997c3bcd849a3aceb221", - "index_pick.pick.row[{\"subject\":\"s1\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_0", - "index_pick.pick.row[{\"subject\":\"s1\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", - "index_pick.pick.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002d3aa3df31c715ed9534811e3b3ded71a017ea8132b501c69ed3ad5b78411d423", - "index_pick.pick.row[{\"subject\":\"s2\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_1", - "index_pick.pick.row[{\"subject\":\"s2\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", - "index_pick.pick.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000218fa0f5bdf561a92ce32cecef15970f979890cf7c44fd9b8a0c8766e7c730dc2", - "index_pick.pick.system_tag_columns": [ - "_tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd", - "_tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd" - ], "job.node[adjust].row[{\"subject\":\"s1\"}]._tag_record_id::24bf4e4f1b5fbfa7ff9ee7280a5f680888f965fa0a855159ea5779047a4b1aa3::24bf4e4f1b5fbfa7ff9ee7280a5f680888f965fa0a855159ea5779047a4b1aa3:0": "row_0", "job.node[adjust].row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373:1": "row_0", "job.node[adjust].row[{\"subject\":\"s1\"}]._tag_source_id::24bf4e4f1b5fbfa7ff9ee7280a5f680888f965fa0a855159ea5779047a4b1aa3::24bf4e4f1b5fbfa7ff9ee7280a5f680888f965fa0a855159ea5779047a4b1aa3:0": "scans", @@ -326,8 +277,6 @@ "_tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:1", "_tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:1" ], - "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000025019693a2d1d578c8af9aaae0e3dab43933bbf1196b4e42a4c3a83c80a1f61ef", - "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000022166408838e16c8aac02628c1ab78d2e6ab30d5751d26b5a603cfaeab2d65df6", "join_key_nullability.semi_join_left_nullable.content_hash": "semantic_v1:78ec7d0b87b6e758692337725de8ecb40ae0d4a3c2fa66c906cb3ed1b9aa6267", "join_key_nullability.semi_join_left_nullable.pipeline_hash": "semantic_v1:427d4a07cdf3dd5e74d5a808a915ef74852ef592880c5a35d32bfdcbdfe92008", "join_key_nullability.semi_join_left_nullable.row[{\"subject\":\"s1\"}]._tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87": "row_0", @@ -387,36 +336,6 @@ "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373:1" ], "list_tag_producerless_stream.reversed": "semantic_v1:ad76e4cf890d6cf18777dfc3e1998d322a2e7079a9f5824abe1f34f42f3265da", - "map_columns.drop_unmapped.content_hash": "semantic_v1:dbee292987b03cb1bdb3ef0fd6be097240b308d08f9eeeb91d180b2740be69cb", - "map_columns.drop_unmapped.pipeline_hash": "semantic_v1:27ad3d292121b825fe85b28e54cfb432cecaaa53978431c9039f47df038af54f", - "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_0", - "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}].data_hash": "arrow_v1:0000025eca48b03061872990e7d71bc1d2ff2780795d168481bba072960cf91368c3bf", - "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_1", - "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}].data_hash": "arrow_v1:000002ef0edcfe57d8308fb8f035d58bdd0d4423161cbd05cf90985b32c98aa66e8ccc", - "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_2", - "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}].data_hash": "arrow_v1:000002371aa9a6b18f88c2e770fdae5f1c47c467fa25742439d7dc773bd9aa217d0ee9", - "map_columns.drop_unmapped.system_tag_columns": [ - "_tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec", - "_tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec" - ], - "map_columns.rename.content_hash": "semantic_v1:288ad1168e3be6273284ceed01a56b9e45c8213182f50b19bbe1274e2e2e5432", - "map_columns.rename.pipeline_hash": "semantic_v1:a6d3125ac50d611791a691fb8f05be49b3e0350a1b071fc274839ff71d0f79ed", - "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_0", - "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}].data_hash": "arrow_v1:0000022ad1363967c26697bb148943f0b193f748f21da43e4ba5f3763197a04bf53289", - "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_1", - "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}].data_hash": "arrow_v1:000002a61fcaac02c3fd261c22c4fab3c89182aef1912fb4a19ae1c01af9cf69b4b6b6", - "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_2", - "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", - "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}].data_hash": "arrow_v1:000002ef21c37efbb54c93fff65d16c5222fed1364ebf8ab9a49758b064f3edd83f3a1", - "map_columns.rename.system_tag_columns": [ - "_tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec", - "_tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec" - ], "map_data.content_hash": "semantic_v1:5dc048a18ed101f311e58853fe170a5d6951af7aca7b67c79bdb5252f3f4fd31", "map_data.pipeline_hash": "semantic_v1:e56188c74c72cb812622267bee5fef68c5b9237c8f5b38571c5f5d2a3a4176de", "map_data.row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "row_0", @@ -432,22 +351,6 @@ "_tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373", "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373" ], - "merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "row_0", - "merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "row_0", - "merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "reweigh", - "merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "subjects", - "merge_join.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002654a49c9ec7661bbbb88c7695033d0082d20abafa31fcfa9112e39834de7cc5d", - "merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "row_1", - "merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "row_2", - "merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "reweigh", - "merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "subjects", - "merge_join.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:000002b78038f0da00d8b6e29ff96251d4d12632f5c978e5fa58dc118e53e582f90c96", - "merge_join.system_tag_columns": [ - "_tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0", - "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0", - "_tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1", - "_tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1" - ], "pod.row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "row_0", "pod.row[{\"subject\":\"s1\"}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "subjects", "pod.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000024da91c65d3ebacee016a9080299e31887b2aabe961f00c475443c6930693e22a", diff --git a/tests/test_hashing/golden/data/v1/pipeline-02.json b/tests/test_hashing/golden/data/v1/pipeline-02.json index 6238e81f8..20b7dfc9c 100644 --- a/tests/test_hashing/golden/data/v1/pipeline-02.json +++ b/tests/test_hashing/golden/data/v1/pipeline-02.json @@ -1,43 +1,4 @@ { - "add_tags.every_type.content_hash": "semantic_v1:3ad41cfd204171984d104e117092ffecbb0e758b673f4c9aa329c93ec38763b4", - "add_tags.every_type.pipeline_hash": "semantic_v1:b10ad59c44d364fe81c6f70ba974281be6e12c5dc9e4d58d08292feb319a6b72", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_0", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}].data_hash": "arrow_v1:0000025c8400b7856fb3a703d4468712ba835fc942a04e99380e7c7285477bf385c1aa", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_1", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}].data_hash": "arrow_v1:0000022519804a4e7b61093556c5be8758503e39c1ea3870fef14e25740b5fd49a90e4", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_2", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}].data_hash": "arrow_v1:0000029168ba146c6249e3fe3329c27d2438024e914b975504f69a010daba78436cd29", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_3", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}].data_hash": "arrow_v1:000002e044b0273a565f9232582791227ee32e6268137bd773b3f1c39e360faac5b94b", - "add_tags.every_type.system_tag_columns": [ - "_tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f", - "_tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f" - ], - "add_tags.method.content_hash": "semantic_v1:e6ffb46c9e7132d6d306ba315419b117ed2898cd4183c83981b86e964c1eb31c", - "add_tags.method.pipeline_hash": "semantic_v1:32978d2e24d4734bffcf0bea0e9e0a8ca6635764805f182256b6e12efefbffd8", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_0", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}].data_hash": "arrow_v1:0000025c8400b7856fb3a703d4468712ba835fc942a04e99380e7c7285477bf385c1aa", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_1", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}].data_hash": "arrow_v1:0000022519804a4e7b61093556c5be8758503e39c1ea3870fef14e25740b5fd49a90e4", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_2", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}].data_hash": "arrow_v1:0000029168ba146c6249e3fe3329c27d2438024e914b975504f69a010daba78436cd29", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_3", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", - "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}].data_hash": "arrow_v1:000002e044b0273a565f9232582791227ee32e6268137bd773b3f1c39e360faac5b94b", - "add_tags.method.system_tag_columns": [ - "_tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f", - "_tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f" - ], - "add_tags.operator[every_type].content_hash": "semantic_v1:91fce7b9bb879c3d92cd6423e4368f42ebf667cf89af73af107ac1a88a814c30", - "add_tags.operator[every_type].pipeline_hash": "semantic_v1:91fce7b9bb879c3d92cd6423e4368f42ebf667cf89af73af107ac1a88a814c30", - "default_source_ids.as_source[function_node].source_id": "derived:semantic_v1:6ada754d8fc4292450d3fb8813f05878b8aabbd52da3615519c80c7418bc0b4e", "default_source_ids.list.content_hash": "semantic_v1:9d892efaf950490f157554b14c2f32c8194dcb92e6fa21d29e6f86b0d3e64801", "drop_nulls_job.node[ratio].content_hash": "semantic_v1:09afbbcc0d89147e8bcc05227431ac2a674febbcea331f584bee55927c85e447", "drop_nulls_job.node[ratio].pipeline_hash": "semantic_v1:cf4f9b8dff56193f509a551e7f201a165dd011ec388f9e5c827bb14d82d58376", @@ -53,150 +14,6 @@ "golden_drop_null_job/_result/golden_ratio/21e6485805726eb7ceed63ef6b677f0b6b11d2eaf48bd9fc44c1dccdf718aa1d/v0/python.function.v1/rev1/rdb_v1", "golden_drop_null_job/golden_ratio/21e6485805726eb7ceed63ef6b677f0b6b11d2eaf48bd9fc44c1dccdf718aa1d/v0/python.function.v1/schema:cf4f9b8dff56193f509a551e7f201a165dd011ec388f9e5c827bb14d82d58376/pdb_v1" ], - "group_by_arrangement.default.interleaved.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", - "group_by_arrangement.default.interleaved.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", - "group_by_arrangement.default.interleaved.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_arrangement.default.reversed.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", - "group_by_arrangement.default.reversed.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", - "group_by_arrangement.default.reversed.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_arrangement.default.tags_first.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", - "group_by_arrangement.default.tags_first.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", - "group_by_arrangement.default.tags_first.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_arrangement.grouped_again.interleaved.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", - "group_by_arrangement.grouped_again.interleaved.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", - "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", - "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", - "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", - "group_by_arrangement.grouped_again.interleaved.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" - ], - "group_by_arrangement.grouped_again.reversed.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", - "group_by_arrangement.grouped_again.reversed.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", - "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", - "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", - "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", - "group_by_arrangement.grouped_again.reversed.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" - ], - "group_by_arrangement.grouped_again.tags_first.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", - "group_by_arrangement.grouped_again.tags_first.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", - "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", - "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", - "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", - "group_by_arrangement.grouped_again.tags_first.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" - ], - "group_by_arrangement.member_order_y.interleaved.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", - "group_by_arrangement.member_order_y.interleaved.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", - "group_by_arrangement.member_order_y.interleaved.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_arrangement.member_order_y.reversed.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", - "group_by_arrangement.member_order_y.reversed.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", - "group_by_arrangement.member_order_y.reversed.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_arrangement.member_order_y.tags_first.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", - "group_by_arrangement.member_order_y.tags_first.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", - "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", - "group_by_arrangement.member_order_y.tags_first.system_tag_columns": [ - "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", - "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" - ], - "group_by_nan_keys.content_hash": "semantic_v1:440a76d5318ec3d55c8cbdf569f468168ae35ef4ff3251e57f1ee1b173f835a7", - "group_by_nan_keys.data_tag_key.content_hash": "semantic_v1:94b46d0e4613d29dfe5f06623a86552f8e872f5eba3fa0d76ea3693c9e1c0b9c", - "group_by_nan_keys.data_tag_key.pipeline_hash": "semantic_v1:07ef40fee39a17a870e25d24a13d72d9c27195b8f17cc030717d980561ac3c94", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._source_k": "group_v1:aabaa4e051213c68eeb096b4e38e9720d0f9531198dde40939113f3c8bc07416", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:a129e550a9e72a9c72e074e0ed3afffce39ada58073e6e1dcf018b03d309da55", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:9a86e4293f06b800ba18b6120618af58a9d2443ac6aabfc23a867911ac83d531", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].data_hash": "arrow_v1:0000026eb6abde2a57e28a9af20033f401e7d5be56590255423dd38578ea4b8bc6d8fa", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].key_bits": "0", - "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].tag_hash": "arrow_v1:000002c3c7a7994cff84945af2d6431f5c326caaa9730c66c8bfea219445e4e7e6588e", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._source_k": "group_v1:b799bbb52cdc4a7496fa1f9213f4c079fe579069a166f8f7c8f25584f7b49e43", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:15a58a6c8160f20635066df45354c75ee2e2446220d8218f3513910379604b62", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:4a54373ba212a3ac8a5bb554667e191d09090baf16c3c43c06d9999f4df5c487", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].data_hash": "arrow_v1:000002ca3551166efdb59cabd35a1c5e605d234fce59c5972bc18dcf917b6c3b0602a5", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].key_bits": "7f800001", - "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].tag_hash": "arrow_v1:000002586e50f76d93b46583813186e82a5b179d9aaf2ecdf67e5a7da55e7b5083c098", - "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._source_k": "group_v1:95c9de130390ceb327414d685bb28e39b88536215ff54bf3419a0eb831be63f8", - "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:e94b9ef076656ab5b5f91eece564251d16ab77e88be2db5262283ffabe061f2f", - "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:d47fca34430e43831cbbda6a8bc924808c01fbd2ce82830d868fe564323f0923", - "group_by_nan_keys.data_tag_key.row[{\"k\":null}].data_hash": "arrow_v1:000002b80cd3a5b8f1963552a06ceb7ecce1c32c72b533558a6a6dbbdfbe1d7b12db38", - "group_by_nan_keys.data_tag_key.row[{\"k\":null}].key_bits": null, - "group_by_nan_keys.data_tag_key.row[{\"k\":null}].tag_hash": "arrow_v1:0000020d9462d917b515c59d08a022c6328fa90c882ad01a9afd0568720d5fe047541e", - "group_by_nan_keys.data_tag_key.system_tag_columns": [ - "_tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86", - "_tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86" - ], - "group_by_nan_keys.pipeline_hash": "semantic_v1:757b8297a21932d70dd5f816742c2fb0eb159bde455f83373eb3f9a31591d46b", - "group_by_nan_keys.row[{\"k\":0.0}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:a129e550a9e72a9c72e074e0ed3afffce39ada58073e6e1dcf018b03d309da55", - "group_by_nan_keys.row[{\"k\":0.0}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:006df9f09c1fa47b2eb819117849cfc1a1781b3a244b3a05fe0dc07fdb8af1a2", - "group_by_nan_keys.row[{\"k\":0.0}].data_hash": "arrow_v1:000002529ddb22d5950e5c74cf80d618ffc83f8cf705a56f197403ec4e1835a06ba677", - "group_by_nan_keys.row[{\"k\":0.0}].key_bits": "0", - "group_by_nan_keys.row[{\"k\":0.0}].tag_hash": "arrow_v1:0000025651fc4f2e407c80d32ec94f8b7c9266e23136d476d7f80618055473c366e04f", - "group_by_nan_keys.row[{\"k\":NaN}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:15a58a6c8160f20635066df45354c75ee2e2446220d8218f3513910379604b62", - "group_by_nan_keys.row[{\"k\":NaN}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:7600c5c59642d9cc035a04f3d2694fe97220904595fdca39214ab49f21b42047", - "group_by_nan_keys.row[{\"k\":NaN}].data_hash": "arrow_v1:0000024fb6c35ca785c5d07b688027a823d5c9c565ceadadf5d3648926d84df0755a22", - "group_by_nan_keys.row[{\"k\":NaN}].key_bits": "7ff8000000000000", - "group_by_nan_keys.row[{\"k\":NaN}].tag_hash": "arrow_v1:0000026c964d20115d230210455bca1605a00a2fab6412b4de1081e8ee180eb28ba70b", - "group_by_nan_keys.row[{\"k\":null}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:c15b4d7880e5fd711b2b799ad3b08acdbefb04c8ca67c51f284cf5cb1c9f1628", - "group_by_nan_keys.row[{\"k\":null}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:006df9f09c1fa47b2eb819117849cfc1a1781b3a244b3a05fe0dc07fdb8af1a2", - "group_by_nan_keys.row[{\"k\":null}].data_hash": "arrow_v1:0000028a9bb897af2967d6055081dad273123417a319e33b18b6c44c68551b23f89b8b", - "group_by_nan_keys.row[{\"k\":null}].key_bits": null, - "group_by_nan_keys.row[{\"k\":null}].tag_hash": "arrow_v1:0000028511fb665d99c302face48678883c792c7ca0904c03075a5563ca42a6ce7804a", - "group_by_nan_keys.system_tag_columns": [ - "_tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656", - "_tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656" - ], "job.node[adjust].content_hash": "semantic_v1:6ada754d8fc4292450d3fb8813f05878b8aabbd52da3615519c80c7418bc0b4e", "job.node[adjust].pipeline_hash": "semantic_v1:f8f3638bf17df15345b70be956e0779e01c9905db088daa02dfec441d7de441d", "job.table[golden_job/_result/golden_adjust/a2fa1ad227c2c0b24315bf0bfca5b3f5473e1f044a6d48cfcf3b78977510a560/v0/python.function.v1/rev1/rdb_v1].input_data_hashes": [ @@ -211,27 +28,9 @@ "golden_job/_result/golden_adjust/a2fa1ad227c2c0b24315bf0bfca5b3f5473e1f044a6d48cfcf3b78977510a560/v0/python.function.v1/rev1/rdb_v1", "golden_job/golden_adjust/a2fa1ad227c2c0b24315bf0bfca5b3f5473e1f044a6d48cfcf3b78977510a560/v0/python.function.v1/schema:f8f3638bf17df15345b70be956e0779e01c9905db088daa02dfec441d7de441d/pdb_v1" ], - "join_key_nullability.merge_join.content_hash": "semantic_v1:ca01105efb1de0b081ec687fe7f4037a99d482dbb484291390ba81e4ee9e8349", - "join_key_nullability.merge_join.pipeline_hash": "semantic_v1:45985a1174c1a3ecedfbe4621be2a18b89b130bac8c6c709dbd9aa649ea95ec7", - "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "row_0", - "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "row_0", - "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "golden_plain_key", - "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "golden_nullable_key", - "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "row_2", - "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "row_2", - "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "golden_plain_key", - "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "golden_nullable_key", - "join_key_nullability.merge_join.system_tag_columns": [ - "_tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0", - "_tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0", - "_tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1", - "_tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1" - ], "join_pod.pod.content_hash": "semantic_v1:6ada754d8fc4292450d3fb8813f05878b8aabbd52da3615519c80c7418bc0b4e", "join_pod.pod.pipeline_hash": "semantic_v1:f8f3638bf17df15345b70be956e0779e01c9905db088daa02dfec441d7de441d", "list_tag_producerless_stream.as_given": "semantic_v1:ad76e4cf890d6cf18777dfc3e1998d322a2e7079a9f5824abe1f34f42f3265da", - "merge_join.content_hash": "semantic_v1:ae8410f9b8cb0940988ec66d428c05984b92c2f78c28e0dcc75d5cd1fa073e2e", - "merge_join.pipeline_hash": "semantic_v1:5f20d36ecb37199b4abde20444a5b857610d89df8d6dad3af3fad3d0848a0f3f", "pod.content_hash": "semantic_v1:9b6de7be825efc4495abaa60baf14e0bc5dbd034f68751b95546308e1266a93a", "pod.pipeline_hash": "semantic_v1:a7f19352f4abe281d50ffdd8d5574b04ea494f5e9da8daef30e189c3fc0ac693", "pod_default_version.decorator.uri": [ diff --git a/tests/test_hashing/golden/data/v1/provisional/arrow.json b/tests/test_hashing/golden/data/v1/provisional/arrow.json new file mode 100644 index 000000000..990ebf1d1 --- /dev/null +++ b/tests/test_hashing/golden/data/v1/provisional/arrow.json @@ -0,0 +1,12 @@ +{ + "extension_no_values.all_null.dataframe": "arrow_v1:0000025185ba76517a22a9427612c3fa5e49a3cd5c800c71cff83fb474c8a39dd78516", + "extension_no_values.all_null.ndarray": "arrow_v1:0000023e4d6199067f84c55c41d5fa5796bd57ed8157e09cf79c9452d2812b6363ae44", + "extension_no_values.all_null.series": "arrow_v1:0000025699fe402adca996592df2b00e11d2993ee3c59bb45e849c9928d322e129a951", + "extension_no_values.zero_rows.dataframe": "arrow_v1:000002bc85ae91fb30f91afb81787c6bd3fa21fb793064c9f00ed33d361d2d19ac2c9b", + "extension_no_values.zero_rows.ndarray": "arrow_v1:0000022380492b0ec32f02eaf62e1fb8baa08f23fbeda5a5df32792dbaa7ba5c22d1d9", + "extension_no_values.zero_rows.series": "arrow_v1:0000029bedd709e27087807701315dbcca9215a4fc2a118d2f9175d7e5cc6036f2d2ba", + "polars_extension_no_values.all_null.dataframe": "arrow_v1:000002002479ebedc867c8831d99eaf4821e9c4e8c4679726ab7a7f1b37946ddc5d6f3", + "polars_extension_no_values.all_null.series": "arrow_v1:00000240b2c2cd8596cff8213da703e3dbbe903cbb32466a21ee6286e6d425f0207b9c", + "polars_extension_no_values.zero_rows.dataframe": "arrow_v1:000002311e399e27347b47d6644b886184956bbaeea9f077ecbb658ddaa90abb7bb723", + "polars_extension_no_values.zero_rows.series": "arrow_v1:000002f609a54331f5b3bfab74b2220c34dbc708a42c768f79fd2487b0f2e966b41935" +} diff --git a/tests/test_hashing/golden/data/v1/provisional/datagram.json b/tests/test_hashing/golden/data/v1/provisional/datagram.json new file mode 100644 index 000000000..94040c006 --- /dev/null +++ b/tests/test_hashing/golden/data/v1/provisional/datagram.json @@ -0,0 +1,67 @@ +{ + "dataframe.content_hash": "semantic_v1:a7a9576e34dfa6a9a6ada018df8e76cf893fc4c965478291ccd7c61c4f5617b7", + "dataframe.pipeline_hash": "semantic_v1:8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c", + "dataframe.row[{\"k\":\"r1\"}]._tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "row_0", + "dataframe.row[{\"k\":\"r1\"}]._tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "golden_dataframe", + "dataframe.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000022cd5a960b5404d8a5a0e8ca1d33dec1b1bb1271d99c69fc5f1601a2bfa57a045", + "dataframe.row[{\"k\":\"r2\"}]._tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "row_1", + "dataframe.row[{\"k\":\"r2\"}]._tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c": "golden_dataframe", + "dataframe.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002f96baa41d284be17280d30a874fb0d60a2b87bf9a267839226f487e8c43e71f2", + "dataframe.system_tag_columns": [ + "_tag_source_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c", + "_tag_record_id::8f3d461d0fe391552deb8102b2b65e2ba407ba4418cff29fbaad0c947556ed5c" + ], + "ndarray.content_hash": "semantic_v1:055f5e3bdb5ec852b95c7c826f126dc4b89857202e505c46becce71c8fb616f7", + "ndarray.pipeline_hash": "semantic_v1:7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e", + "ndarray.row[{\"k\":\"r1\"}]._tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "row_0", + "ndarray.row[{\"k\":\"r1\"}]._tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "golden_ndarray", + "ndarray.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000021d3f4daa4e92c343b184b4a56c92dc854d68345ffa51f085077d8edadf2a2955", + "ndarray.row[{\"k\":\"r2\"}]._tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "row_1", + "ndarray.row[{\"k\":\"r2\"}]._tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e": "golden_ndarray", + "ndarray.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:00000203ec0ae4b9a347cfa41dca36122c606b914c8e39770e5101d8e32d4fbdfd5f52", + "ndarray.system_tag_columns": [ + "_tag_source_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e", + "_tag_record_id::7516db139cf067233caf24058b8a0a4fdc30cd2b61f88eef6e95629ac3b6024e" + ], + "polars_data_hash.empty_with_schema": "arrow_v1:000002d9112470c27f707ac0f7eb6f992d18e03a46b80bdf1b270115b55010c706e05a", + "polars_data_hash.nested_and_categorical": "arrow_v1:000002802feecb7e28723e67ef58702803a4a6afb1360cf398a13cf1ddb7fa9b4387fc", + "polars_data_hash.nulls_and_temporal": "arrow_v1:0000023f814a933ffd61a3ae31cb85a5c6be6ad42e2b1b9dc1bb946d572799cd5a66ae", + "polars_data_hash.series": "arrow_v1:000002a8cabb92adcf6e6346c953872a8afd4e57498cbc9f1a8181ec0287ff49a6ff1f", + "polars_data_hash.simple": "arrow_v1:0000028764c304ac871a29a42bfc1b88695820a30f42b7a0507b43f39c559675f81839", + "polars_dataframe.content_hash": "semantic_v1:6e3864850fa65c99695c5b52fbd6206c12799806e4b7009859f779b9c469cc3e", + "polars_dataframe.pipeline_hash": "semantic_v1:71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10", + "polars_dataframe.row[{\"k\":\"r1\"}]._tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "row_0", + "polars_dataframe.row[{\"k\":\"r1\"}]._tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "golden_polars_dataframe", + "polars_dataframe.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:0000023af93c03df5d4ce9706c8a01857e231bed3b0544ff0616ab60e0761aff27ab42", + "polars_dataframe.row[{\"k\":\"r2\"}]._tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "row_1", + "polars_dataframe.row[{\"k\":\"r2\"}]._tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10": "golden_polars_dataframe", + "polars_dataframe.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002fd197fcd2ee23a3ea164bb220bedde1c4828a6bd45d9c504ba063317d813e98d", + "polars_dataframe.system_tag_columns": [ + "_tag_source_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10", + "_tag_record_id::71e57370beac0af0323e518a51a15878858cc8d558afe9d5e2224b6ca57b2d10" + ], + "polars_series.content_hash": "semantic_v1:c9ef6b9d60f1ec37bcdd77bd376ac46ac459e4fb0b075b413864808c8eb98d27", + "polars_series.pipeline_hash": "semantic_v1:3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951", + "polars_series.row[{\"k\":\"r1\"}]._tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "row_0", + "polars_series.row[{\"k\":\"r1\"}]._tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "golden_polars_series", + "polars_series.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:00000296532a3b0fd23c4fb8199736b921b70ed902f22e609554aea763583debe0b86a", + "polars_series.row[{\"k\":\"r2\"}]._tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "row_1", + "polars_series.row[{\"k\":\"r2\"}]._tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951": "golden_polars_series", + "polars_series.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002f738c7942bb078b92e25f86a8d44dabc489523bb849359b401cf3df8e93ab40a", + "polars_series.system_tag_columns": [ + "_tag_source_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951", + "_tag_record_id::3c7ad61d79b8aac464518715b38a7a09df7dc21b53b3608ccacc76dbc637b951" + ], + "structural_with_array.content_hash": "semantic_v1:254cb945b734e22a0052aa88047f828199a1c8ed4b26c89b8c9580abe6b91b6f", + "structural_with_array.pipeline_hash": "semantic_v1:bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b", + "structural_with_array.row[{\"k\":\"r1\"}]._tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "row_0", + "structural_with_array.row[{\"k\":\"r1\"}]._tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "golden_structural_with_array", + "structural_with_array.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:00000233b4f923a391a10f061af0708c403d46114d7a4d815cd23d8e6c054db99e1668", + "structural_with_array.row[{\"k\":\"r2\"}]._tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "row_1", + "structural_with_array.row[{\"k\":\"r2\"}]._tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b": "golden_structural_with_array", + "structural_with_array.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:000002fb57ad80c23a7d4c1ef8d73edd5092a3e2b7da31b755c874aedfd40e7e006369", + "structural_with_array.system_tag_columns": [ + "_tag_source_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b", + "_tag_record_id::bc282e7dbc71ac308c92f1fbf46af4c16c24ae3f09ccc63f81d18f866ebaeb9b" + ] +} diff --git a/tests/test_hashing/golden/data/v1/provisional/pipeline.json b/tests/test_hashing/golden/data/v1/provisional/pipeline.json index bfe8100c5..d8be935df 100644 --- a/tests/test_hashing/golden/data/v1/provisional/pipeline.json +++ b/tests/test_hashing/golden/data/v1/provisional/pipeline.json @@ -1,4 +1,302 @@ { + "add_tags.every_type.content_hash": "semantic_v1:3ad41cfd204171984d104e117092ffecbb0e758b673f4c9aa329c93ec38763b4", + "add_tags.every_type.pipeline_hash": "semantic_v1:b10ad59c44d364fe81c6f70ba974281be6e12c5dc9e4d58d08292feb319a6b72", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_0", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r1\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"a\",\"w\":1.5}].data_hash": "arrow_v1:0000025c8400b7856fb3a703d4468712ba835fc942a04e99380e7c7285477bf385c1aa", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_1", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r2\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"b\",\"w\":1.5}].data_hash": "arrow_v1:0000022519804a4e7b61093556c5be8758503e39c1ea3870fef14e25740b5fd49a90e4", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_2", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r3\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":\"c\",\"w\":1.5}].data_hash": "arrow_v1:0000029168ba146c6249e3fe3329c27d2438024e914b975504f69a010daba78436cd29", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_3", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.every_type.row[{\"cohort\":\"A\",\"k\":\"r4\",\"ok\":true,\"raw\":\"01\",\"run\":3,\"site\":null,\"w\":1.5}].data_hash": "arrow_v1:000002e044b0273a565f9232582791227ee32e6268137bd773b3f1c39e360faac5b94b", + "add_tags.every_type.system_tag_columns": [ + "_tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f", + "_tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f" + ], + "add_tags.method.content_hash": "semantic_v1:e6ffb46c9e7132d6d306ba315419b117ed2898cd4183c83981b86e964c1eb31c", + "add_tags.method.pipeline_hash": "semantic_v1:32978d2e24d4734bffcf0bea0e9e0a8ca6635764805f182256b6e12efefbffd8", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_0", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r1\",\"run\":3,\"site\":\"a\"}].data_hash": "arrow_v1:0000025c8400b7856fb3a703d4468712ba835fc942a04e99380e7c7285477bf385c1aa", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_1", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r2\",\"run\":3,\"site\":\"b\"}].data_hash": "arrow_v1:0000022519804a4e7b61093556c5be8758503e39c1ea3870fef14e25740b5fd49a90e4", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_2", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r3\",\"run\":3,\"site\":\"c\"}].data_hash": "arrow_v1:0000029168ba146c6249e3fe3329c27d2438024e914b975504f69a010daba78436cd29", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}]._tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "row_3", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}]._tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f": "golden_nullable", + "add_tags.method.row[{\"cohort\":\"A\",\"k\":\"r4\",\"run\":3,\"site\":null}].data_hash": "arrow_v1:000002e044b0273a565f9232582791227ee32e6268137bd773b3f1c39e360faac5b94b", + "add_tags.method.system_tag_columns": [ + "_tag_source_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f", + "_tag_record_id::a4a91ac74561d231cff4ab05fdb7e199d259e8765f3af954e23d2c152b564b4f" + ], + "add_tags.operator[every_type].content_hash": "semantic_v1:91fce7b9bb879c3d92cd6423e4368f42ebf667cf89af73af107ac1a88a814c30", + "add_tags.operator[every_type].pipeline_hash": "semantic_v1:91fce7b9bb879c3d92cd6423e4368f42ebf667cf89af73af107ac1a88a814c30", + "batch.content_hash": "semantic_v1:da1bfcbda8e0e1fe5505f4877cf58c98222ad2f80dc62aad03159b3954f7fe10", + "batch.pipeline_hash": "semantic_v1:f31d11199ee9107bee28d14765e91a0dc35a611eb4c0935b2442abcf64e4d818", + "batch.row[{\"subject\":[\"s1\",\"s2\"]}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:9be3abf473e589e83e5229ad28484593860af85bd0d2592ca879add89a656125", + "batch.row[{\"subject\":[\"s1\",\"s2\"]}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:bcee0cac2ac80330f73416b8d8e249dd58f3b8c7089b28d6539f1550e1542eee", + "batch.row[{\"subject\":[\"s1\",\"s2\"]}].data_hash": "arrow_v1:0000020b638d3ccc763f2a88e2ade9b759bb8641c55073185d4839047a3fc91276dc7d", + "batch.row[{\"subject\":[\"s3\"]}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:80636a45b1ecdbb1a1d1cdb4956ebb5e72dcb98b66c03eda55a06a7904e8e683", + "batch.row[{\"subject\":[\"s3\"]}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373": "batch_v1:9004bfa909932fc723ffc075ce862a93fa8b315fc7efc50002e6a9450acaabbb", + "batch.row[{\"subject\":[\"s3\"]}].data_hash": "arrow_v1:000002928bbf5d31fadf74ea3118af85c0d2273f77d53274f492e63a955520e4fac208", + "batch.system_tag_columns": [ + "_tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373", + "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373" + ], + "default_source_ids.as_source[function_node].source_id": "derived:semantic_v1:6ada754d8fc4292450d3fb8813f05878b8aabbd52da3615519c80c7418bc0b4e", + "default_source_ids.as_source[operator_node].source_id": "derived:semantic_v1:82f3820c8ac3225f4b9c61f2c018d81320524745fd9362276e9b7dfdb898affa", + "group_by.content_hash": "semantic_v1:e39fd80bf63f3549d59902281171f1d94fba5202fad99b7b29eb1a48d4e31364", + "group_by.pipeline_hash": "semantic_v1:a54462063efcb67b3d3df58840d7b63d5d5b6d2d772efc154655859fe7588400", + "group_by.row[{\"cohort\":\"a\"}]._tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:9be3abf473e589e83e5229ad28484593860af85bd0d2592ca879add89a656125", + "group_by.row[{\"cohort\":\"a\"}]._tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:11316416683632ce9125c3a3ab58c085c03b46bc8b8b14767b70ad33d90d621f", + "group_by.row[{\"cohort\":\"a\"}].data_hash": "arrow_v1:000002b50de37e741a154b01d9b0492bc3f3b6db1044edf8abee33e6e895037fdef81e", + "group_by.row[{\"cohort\":\"b\"}]._tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:80636a45b1ecdbb1a1d1cdb4956ebb5e72dcb98b66c03eda55a06a7904e8e683", + "group_by.row[{\"cohort\":\"b\"}]._tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "group_v1:0e3b86a9fbf8566e5a1f4e53b501f566da56327a6d0ecf2e78f2288f76167dd7", + "group_by.row[{\"cohort\":\"b\"}].data_hash": "arrow_v1:0000026bc48a0e74f57c3f5968efabefb44d0a2364abcba5d4b2237bb1a27ffe993d6c", + "group_by.system_tag_columns": [ + "_tag_source_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b", + "_tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b" + ], + "group_by_arrangement.default.interleaved.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", + "group_by_arrangement.default.interleaved.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.interleaved.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", + "group_by_arrangement.default.interleaved.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_arrangement.default.reversed.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", + "group_by_arrangement.default.reversed.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.reversed.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", + "group_by_arrangement.default.reversed.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_arrangement.default.tags_first.content_hash": "semantic_v1:33994dc5eb4e5fdc0797c5d090fd91b3b8bfa7dd138763d944bbb390acb848d0", + "group_by_arrangement.default.tags_first.pipeline_hash": "semantic_v1:049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:8c07899443ee6fcd1c5063e7b3b539372e18ac38101ddbb53cbb8c35a55bf877", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:00000283c4201a810f7effa3ab65684519f59e751e2c1fcedbe8e1633d6c3b24e209bd", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:97aac73352f010c73664dd2e869a00e6a7e59644036afffa8850d67400652d09", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.default.tags_first.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:000002dfe264b0dcfd043bef99f03cbae4a6b0959b5dea7e3faf08824f84a8ef17e215", + "group_by_arrangement.default.tags_first.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_arrangement.grouped_again.interleaved.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", + "group_by_arrangement.grouped_again.interleaved.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", + "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", + "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", + "group_by_arrangement.grouped_again.interleaved.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", + "group_by_arrangement.grouped_again.interleaved.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" + ], + "group_by_arrangement.grouped_again.reversed.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", + "group_by_arrangement.grouped_again.reversed.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", + "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", + "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", + "group_by_arrangement.grouped_again.reversed.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", + "group_by_arrangement.grouped_again.reversed.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" + ], + "group_by_arrangement.grouped_again.tags_first.content_hash": "semantic_v1:2e82bc15f962fc2ed103e7a87d679881b8935b5d2342a98597599d5dd4c59217", + "group_by_arrangement.grouped_again.tags_first.pipeline_hash": "semantic_v1:1b13b4add9113d32ea8950cfd695c9dfb0cb960f72e891ba0012437e6782c58e", + "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:0fb6d3b0875152e5728a67b1a53acf903ff1b2e5463ef866703f5bf7d39de6f9", + "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8": "group_v1:f5c2827c3bf542429f710e3f600266c761655fc041c5ca777a68f931b4ebfabe", + "group_by_arrangement.grouped_again.tags_first.row[{\"g\":\"a\"}].data_hash": "arrow_v1:00000205e0ff834a21a6cfd774cc736ab49e7b966de222bcb1af1804171adcde6554a3", + "group_by_arrangement.grouped_again.tags_first.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::049a1fb3744027bea2a31ca70c960364adf513667b3c09f30441646c43b157f8" + ], + "group_by_arrangement.member_order_y.interleaved.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", + "group_by_arrangement.member_order_y.interleaved.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.interleaved.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", + "group_by_arrangement.member_order_y.interleaved.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_arrangement.member_order_y.reversed.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", + "group_by_arrangement.member_order_y.reversed.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.reversed.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", + "group_by_arrangement.member_order_y.reversed.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_arrangement.member_order_y.tags_first.content_hash": "semantic_v1:6fbead157dda03d93842659d9317fcb3a3f7d6a63a818a1d582b41709c7c0857", + "group_by_arrangement.member_order_y.tags_first.pipeline_hash": "semantic_v1:217d48e4d36b3156a78fa296917976eb1ff00bf3fa82f63cbb3778a7eb1085c1", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:e728179de208af5490ea26a2e109bfad5878e0c1681232c81e61f846484d257e", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":1}].data_hash": "arrow_v1:0000021c73412513e56fa02758fa9766402935bfad6b8833a7cd3668390450d36985a0", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:b1b330833a7e0d58dc74582079e759f5952b70e582e13a745120a0e36712bde4", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}]._tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8": "group_v1:16e676e585285bc478dcd6b8c2ecb19c8aeebc9e125505b32ac6be7283062a32", + "group_by_arrangement.member_order_y.tags_first.row[{\"g\":\"a\",\"k\":2}].data_hash": "arrow_v1:0000028eb8899531b475f6756bdf46d8834637915ec691ca020565db8fc85cf46adaa1", + "group_by_arrangement.member_order_y.tags_first.system_tag_columns": [ + "_tag_source_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8", + "_tag_record_id::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8::009b87c48e0540870894b8e1434a47f6e9150c21d7a401ecd9b791bdec215ee8" + ], + "group_by_nan_keys.content_hash": "semantic_v1:440a76d5318ec3d55c8cbdf569f468168ae35ef4ff3251e57f1ee1b173f835a7", + "group_by_nan_keys.data_tag_key.content_hash": "semantic_v1:94b46d0e4613d29dfe5f06623a86552f8e872f5eba3fa0d76ea3693c9e1c0b9c", + "group_by_nan_keys.data_tag_key.pipeline_hash": "semantic_v1:07ef40fee39a17a870e25d24a13d72d9c27195b8f17cc030717d980561ac3c94", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._source_k": "group_v1:aabaa4e051213c68eeb096b4e38e9720d0f9531198dde40939113f3c8bc07416", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:a129e550a9e72a9c72e074e0ed3afffce39ada58073e6e1dcf018b03d309da55", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:9a86e4293f06b800ba18b6120618af58a9d2443ac6aabfc23a867911ac83d531", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].data_hash": "arrow_v1:0000026eb6abde2a57e28a9af20033f401e7d5be56590255423dd38578ea4b8bc6d8fa", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].key_bits": "0", + "group_by_nan_keys.data_tag_key.row[{\"k\":0.0}].tag_hash": "arrow_v1:000002c3c7a7994cff84945af2d6431f5c326caaa9730c66c8bfea219445e4e7e6588e", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._source_k": "group_v1:b799bbb52cdc4a7496fa1f9213f4c079fe579069a166f8f7c8f25584f7b49e43", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:15a58a6c8160f20635066df45354c75ee2e2446220d8218f3513910379604b62", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:4a54373ba212a3ac8a5bb554667e191d09090baf16c3c43c06d9999f4df5c487", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].data_hash": "arrow_v1:000002ca3551166efdb59cabd35a1c5e605d234fce59c5972bc18dcf917b6c3b0602a5", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].key_bits": "7f800001", + "group_by_nan_keys.data_tag_key.row[{\"k\":NaN}].tag_hash": "arrow_v1:000002586e50f76d93b46583813186e82a5b179d9aaf2ecdf67e5a7da55e7b5083c098", + "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._source_k": "group_v1:95c9de130390ceb327414d685bb28e39b88536215ff54bf3419a0eb831be63f8", + "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:e94b9ef076656ab5b5f91eece564251d16ab77e88be2db5262283ffabe061f2f", + "group_by_nan_keys.data_tag_key.row[{\"k\":null}]._tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86": "group_v1:d47fca34430e43831cbbda6a8bc924808c01fbd2ce82830d868fe564323f0923", + "group_by_nan_keys.data_tag_key.row[{\"k\":null}].data_hash": "arrow_v1:000002b80cd3a5b8f1963552a06ceb7ecce1c32c72b533558a6a6dbbdfbe1d7b12db38", + "group_by_nan_keys.data_tag_key.row[{\"k\":null}].key_bits": null, + "group_by_nan_keys.data_tag_key.row[{\"k\":null}].tag_hash": "arrow_v1:0000020d9462d917b515c59d08a022c6328fa90c882ad01a9afd0568720d5fe047541e", + "group_by_nan_keys.data_tag_key.system_tag_columns": [ + "_tag_source_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86", + "_tag_record_id::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86::955dd62c8087caae0a03dbe9bee3e42ca10d0673586b3fb3f2c3429913df3f86" + ], + "group_by_nan_keys.pipeline_hash": "semantic_v1:757b8297a21932d70dd5f816742c2fb0eb159bde455f83373eb3f9a31591d46b", + "group_by_nan_keys.row[{\"k\":0.0}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:a129e550a9e72a9c72e074e0ed3afffce39ada58073e6e1dcf018b03d309da55", + "group_by_nan_keys.row[{\"k\":0.0}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:006df9f09c1fa47b2eb819117849cfc1a1781b3a244b3a05fe0dc07fdb8af1a2", + "group_by_nan_keys.row[{\"k\":0.0}].data_hash": "arrow_v1:000002529ddb22d5950e5c74cf80d618ffc83f8cf705a56f197403ec4e1835a06ba677", + "group_by_nan_keys.row[{\"k\":0.0}].key_bits": "0", + "group_by_nan_keys.row[{\"k\":0.0}].tag_hash": "arrow_v1:0000025651fc4f2e407c80d32ec94f8b7c9266e23136d476d7f80618055473c366e04f", + "group_by_nan_keys.row[{\"k\":NaN}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:15a58a6c8160f20635066df45354c75ee2e2446220d8218f3513910379604b62", + "group_by_nan_keys.row[{\"k\":NaN}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:7600c5c59642d9cc035a04f3d2694fe97220904595fdca39214ab49f21b42047", + "group_by_nan_keys.row[{\"k\":NaN}].data_hash": "arrow_v1:0000024fb6c35ca785c5d07b688027a823d5c9c565ceadadf5d3648926d84df0755a22", + "group_by_nan_keys.row[{\"k\":NaN}].key_bits": "7ff8000000000000", + "group_by_nan_keys.row[{\"k\":NaN}].tag_hash": "arrow_v1:0000026c964d20115d230210455bca1605a00a2fab6412b4de1081e8ee180eb28ba70b", + "group_by_nan_keys.row[{\"k\":null}]._tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:c15b4d7880e5fd711b2b799ad3b08acdbefb04c8ca67c51f284cf5cb1c9f1628", + "group_by_nan_keys.row[{\"k\":null}]._tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656": "group_v1:006df9f09c1fa47b2eb819117849cfc1a1781b3a244b3a05fe0dc07fdb8af1a2", + "group_by_nan_keys.row[{\"k\":null}].data_hash": "arrow_v1:0000028a9bb897af2967d6055081dad273123417a319e33b18b6c44c68551b23f89b8b", + "group_by_nan_keys.row[{\"k\":null}].key_bits": null, + "group_by_nan_keys.row[{\"k\":null}].tag_hash": "arrow_v1:0000028511fb665d99c302face48678883c792c7ca0904c03075a5563ca42a6ce7804a", + "group_by_nan_keys.system_tag_columns": [ + "_tag_source_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656", + "_tag_record_id::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656::b9b2a71e04d7acbbbcb6d4e9ed74068893840cbed90077e3567c6851b533a656" + ], + "index_pick.index.content_hash": "semantic_v1:dc992a4f7c6ee172a8dd9cef2866c9c083eeb923b471dfeadde74f20c6670a1e", + "index_pick.index.pipeline_hash": "semantic_v1:d6f27ebb144aa642d4cf39ae4e7b013b4542c3996a2b8424adbad6523108be5b", + "index_pick.index.row[{\"subject\":\"s1\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_0", + "index_pick.index.row[{\"subject\":\"s1\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", + "index_pick.index.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002948e686a8a041a7323c3474c6d7861e4536e57ddb8096704f395daecca80e742", + "index_pick.index.row[{\"subject\":\"s2\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_1", + "index_pick.index.row[{\"subject\":\"s2\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", + "index_pick.index.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:000002ecef3b9df41f6928426d3a063d9eb64485f7e78fc72ef50dad5b3c06bd8aee3a", + "index_pick.index.system_tag_columns": [ + "_tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd", + "_tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd" + ], + "index_pick.pick.content_hash": "semantic_v1:76f12a3ce6745bd0467e31fd538a9700d79921048b67b8982c88788549773654", + "index_pick.pick.pipeline_hash": "semantic_v1:86aaab059ebda8378b7262393cf36b62d6fa945ee4d0997c3bcd849a3aceb221", + "index_pick.pick.row[{\"subject\":\"s1\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_0", + "index_pick.pick.row[{\"subject\":\"s1\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", + "index_pick.pick.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002d3aa3df31c715ed9534811e3b3ded71a017ea8132b501c69ed3ad5b78411d423", + "index_pick.pick.row[{\"subject\":\"s2\"}]._tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "row_1", + "index_pick.pick.row[{\"subject\":\"s2\"}]._tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd": "lists", + "index_pick.pick.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000218fa0f5bdf561a92ce32cecef15970f979890cf7c44fd9b8a0c8766e7c730dc2", + "index_pick.pick.system_tag_columns": [ + "_tag_source_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd", + "_tag_record_id::b3a8a35d52464445b96740e7e6c7c1d963b69b4d803de3fb21af53c5c1fd9afd" + ], + "join_key_nullability.merge_join.content_hash": "semantic_v1:ca01105efb1de0b081ec687fe7f4037a99d482dbb484291390ba81e4ee9e8349", + "join_key_nullability.merge_join.pipeline_hash": "semantic_v1:45985a1174c1a3ecedfbe4621be2a18b89b130bac8c6c709dbd9aa649ea95ec7", + "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "row_0", + "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "row_0", + "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "golden_plain_key", + "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "golden_nullable_key", + "join_key_nullability.merge_join.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000025019693a2d1d578c8af9aaae0e3dab43933bbf1196b4e42a4c3a83c80a1f61ef", + "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "row_2", + "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "row_2", + "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1": "golden_plain_key", + "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0": "golden_nullable_key", + "join_key_nullability.merge_join.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000022166408838e16c8aac02628c1ab78d2e6ab30d5751d26b5a603cfaeab2d65df6", + "join_key_nullability.merge_join.system_tag_columns": [ + "_tag_source_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0", + "_tag_record_id::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87::fddb365c4147114d8cfc5dcbd611e037b0f7f2729238cd29ade9a66578acad87:0", + "_tag_source_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1", + "_tag_record_id::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e::d8f6f3824cdd5ed5f1795c5a050b727f3e05354c78d68a1aaff4056a9b66771e:1" + ], + "map_columns.drop_unmapped.content_hash": "semantic_v1:dbee292987b03cb1bdb3ef0fd6be097240b308d08f9eeeb91d180b2740be69cb", + "map_columns.drop_unmapped.pipeline_hash": "semantic_v1:27ad3d292121b825fe85b28e54cfb432cecaaa53978431c9039f47df038af54f", + "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_0", + "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.drop_unmapped.row[{\"animal\":\"s1\"}].data_hash": "arrow_v1:0000025eca48b03061872990e7d71bc1d2ff2780795d168481bba072960cf91368c3bf", + "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_1", + "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.drop_unmapped.row[{\"animal\":\"s2\"}].data_hash": "arrow_v1:000002ef0edcfe57d8308fb8f035d58bdd0d4423161cbd05cf90985b32c98aa66e8ccc", + "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_2", + "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.drop_unmapped.row[{\"animal\":\"s3\"}].data_hash": "arrow_v1:000002371aa9a6b18f88c2e770fdae5f1c47c467fa25742439d7dc773bd9aa217d0ee9", + "map_columns.drop_unmapped.system_tag_columns": [ + "_tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec", + "_tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec" + ], + "map_columns.rename.content_hash": "semantic_v1:288ad1168e3be6273284ceed01a56b9e45c8213182f50b19bbe1274e2e2e5432", + "map_columns.rename.pipeline_hash": "semantic_v1:a6d3125ac50d611791a691fb8f05be49b3e0350a1b071fc274839ff71d0f79ed", + "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_0", + "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.rename.row[{\"animal\":\"s1\",\"cohort\":\"a\"}].data_hash": "arrow_v1:0000022ad1363967c26697bb148943f0b193f748f21da43e4ba5f3763197a04bf53289", + "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_1", + "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.rename.row[{\"animal\":\"s2\",\"cohort\":\"a\"}].data_hash": "arrow_v1:000002a61fcaac02c3fd261c22c4fab3c89182aef1912fb4a19ae1c01af9cf69b4b6b6", + "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}]._tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "row_2", + "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}]._tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec": "cohort_subjects", + "map_columns.rename.row[{\"animal\":\"s3\",\"cohort\":\"b\"}].data_hash": "arrow_v1:000002ef21c37efbb54c93fff65d16c5222fed1364ebf8ab9a49758b064f3edd83f3a1", + "map_columns.rename.system_tag_columns": [ + "_tag_source_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec", + "_tag_record_id::220185c669ba2e7bb644abc11150f3b11d9c41c70b04a6397c68bda95f8d24ec" + ], + "merge_join.content_hash": "semantic_v1:ae8410f9b8cb0940988ec66d428c05984b92c2f78c28e0dcc75d5cd1fa073e2e", + "merge_join.pipeline_hash": "semantic_v1:5f20d36ecb37199b4abde20444a5b857610d89df8d6dad3af3fad3d0848a0f3f", + "merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "row_0", + "merge_join.row[{\"subject\":\"s1\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "row_0", + "merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "reweigh", + "merge_join.row[{\"subject\":\"s1\"}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "subjects", + "merge_join.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:000002654a49c9ec7661bbbb88c7695033d0082d20abafa31fcfa9112e39834de7cc5d", + "merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "row_1", + "merge_join.row[{\"subject\":\"s3\"}]._tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "row_2", + "merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1": "reweigh", + "merge_join.row[{\"subject\":\"s3\"}]._tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0": "subjects", + "merge_join.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:000002b78038f0da00d8b6e29ff96251d4d12632f5c978e5fa58dc118e53e582f90c96", + "merge_join.system_tag_columns": [ + "_tag_source_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0", + "_tag_record_id::ac699f6aae66ff1745c42c76a3cb6cf59ba8588efc02d66e4f23de4be09ac373::291aa68096a29e11f917b6276a9932f6874aac880928e17ed9050701d91e4934:0", + "_tag_source_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1", + "_tag_record_id::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b::a1db704c27d87a21807be6313bd1ed34dfb58236ec9f902a19c10c9ce7d46f6b:1" + ], "polars_filter.content_hash": "semantic_v1:54997acd8e669fd9a0cbb1010e0e7e4551bb1a7a830432d6d12a281605955545", "polars_filter.pipeline_hash": "semantic_v1:5df6831d8a21a134aef33ea7b765c7ee081e0742852c5e4c876ffd7b9c8b7b3e", "polars_filter.row[{\"cohort\":\"a\",\"subject\":\"s1\"}]._tag_record_id::10962e3780f562f563f6567468578100550aaeed130ff5e6bf2da41bd2239b5b": "row_0", diff --git a/tests/test_hashing/golden/data/v1/provisional/schema.json b/tests/test_hashing/golden/data/v1/provisional/schema.json new file mode 100644 index 000000000..1124f27cc --- /dev/null +++ b/tests/test_hashing/golden/data/v1/provisional/schema.json @@ -0,0 +1,48 @@ +{ + "derived_source_tags_as_data.named_source_id.content_hash": "semantic_v1:449d23919709e9eca8cb4a629804b8e7366908faf6e61f8cd139791c2dc58552", + "derived_source_tags_as_data.named_source_id.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_0", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000020ca390bc91e4b4d9301afb64c7f53bd90293ce824d71f4dd4c5ae2628f6d93e1", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_1", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000213a205b665ef018579297b571ed5859ca02fb8ce5ef9140da83fbb06d2a6bb16", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_2", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", + "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000020d2eec4dbd9694e33482e1ca86121cbe7992cf801a7d14a43943a5736fac6878", + "derived_source_tags_as_data.named_source_id.source_id": "golden_derived", + "derived_source_tags_as_data.named_source_id.system_tag_columns": [ + "_tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "_tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f" + ], + "derived_source_tags_as_data.record_id_column.content_hash": "semantic_v1:b363917eb697abd9de451a08da097c4e5549d05f1c3700aecbd19b9c7df8372d", + "derived_source_tags_as_data.record_id_column.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s1\"}", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000020ca390bc91e4b4d9301afb64c7f53bd90293ce824d71f4dd4c5ae2628f6d93e1", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s2\"}", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000213a205b665ef018579297b571ed5859ca02fb8ce5ef9140da83fbb06d2a6bb16", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s3\"}", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", + "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000020d2eec4dbd9694e33482e1ca86121cbe7992cf801a7d14a43943a5736fac6878", + "derived_source_tags_as_data.record_id_column.source_id": "golden_derived_keyed", + "derived_source_tags_as_data.record_id_column.system_tag_columns": [ + "_tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "_tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f" + ], + "key_policy_identity.derived_tags_as_data.key.content_hash": "semantic_v1:a97a9f9dea9306bb23932cb89bac4b8195875efe5bdeb535601d20fe508779fe", + "key_policy_identity.derived_tags_as_data.key.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "key_policy_identity.derived_tags_as_data.position.content_hash": "semantic_v1:f8614fbdf134239b1d587a426ae400a02758f08fa5f889c2b0e76493e27fb4e2", + "key_policy_identity.derived_tags_as_data.position.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", + "polars_single_field.dataframe.arrow_type": "extension[large_binary]", + "polars_single_field.dataframe.schema_hash": "semantic_v1:5179f982ace7e129eba0284e1cce96024f13550dda078dda7127c0f1175e2241", + "polars_single_field.series.arrow_type": "extension[large_binary]", + "polars_single_field.series.schema_hash": "semantic_v1:74534c6d145d12c1fa306f3808e5063a5b8ca1397460ed275e5a878c411e52bc", + "single_field.dataframe.arrow_type": "extension[large_binary]", + "single_field.dataframe.schema_hash": "semantic_v1:40aa05560c2f255b20217e630a5364de3d11d50b690f4ede958ac55e27b541e9", + "single_field.ndarray.arrow_type": "extension[large_binary]", + "single_field.ndarray.schema_hash": "semantic_v1:c41dc89a193b046553efd1964914f6f41ecaec7a53d023f95580874b8e0e0a20", + "single_field.structural_with_array.arrow_type": "extension[struct]", + "single_field.structural_with_array.schema_hash": "semantic_v1:799e5e083fb82befdb409b5ded6678117a3741bb5cf83c09fa35ce449abb6bf5" +} diff --git a/tests/test_hashing/golden/data/v1/provisional/semantic.json b/tests/test_hashing/golden/data/v1/provisional/semantic.json index c2484b5e5..4c6acc249 100644 --- a/tests/test_hashing/golden/data/v1/provisional/semantic.json +++ b/tests/test_hashing/golden/data/v1/provisional/semantic.json @@ -8,5 +8,33 @@ "polars_expr.is_between_dates": "polars_expr_v1:1a2d2d7c79256108f22085b36703248fc21f9460a87027ba9285bb09b7cceb3c", "polars_expr.is_in_strings": "polars_expr_v1:cd510b62f38f9e3e3f1b1aba775926ccc2b9b4345867936af59b1779d9c2fc72", "polars_expr.is_not_null_cast": "polars_expr_v1:7a45a5e5c723df3d392600b79eb4dcfc3eb454b9f18b91f356b985fb5e90c4b3", - "polars_expr.str_contains": "polars_expr_v1:4c4cc5f6fe5bed1fbff4f59706145e216bb2597c2710c557d5ab0c39de476feb" + "polars_expr.str_contains": "polars_expr_v1:4c4cc5f6fe5bed1fbff4f59706145e216bb2597c2710c557d5ab0c39de476feb", + "polars_type.dataframe": "semantic_v1:e924850e67f9d3c6f66abf7f72fe71b131e5e8afb9bc958c135f7b0f5a69636f", + "polars_type.series": "semantic_v1:7c68ad68d1bf959a57401cee2679d3ab01b390d118e091c87f8346cec48ea05e", + "polars_value.empty_with_schema": "polars_dataframe_v1:87cefe5fbb989beba6cda87cc1a334d643b878eccbc113d4daf8f0ba74192d81", + "polars_value.nested_and_categorical": "polars_dataframe_v1:2833764295ce6b6a344c15df742bade6be9f51a84655bb5c2f0d42a0786d1f89", + "polars_value.nulls_and_temporal": "polars_dataframe_v1:fccfc33b3a7f171257b87ff20d260d2221085e48e3740d567681414e5ace589a", + "polars_value.series": "polars_series_v1:9ff68c5024750115e606f8e370ceaa55bcb3305227dc6ad45111adaf5a620d88", + "polars_value.simple": "polars_dataframe_v1:92002a1ced22c899f5662ceb4ed2e435ea2d0dddcf28b489ac3f8c8d5226aadf", + "type.dataframe": "semantic_v1:6ccd827bb3bccca86e95244612abe2bba6ff60c927ae2336d91380cfb34a8c2c", + "type.ndarray": "semantic_v1:6b5d34c828127cad41bb98e65450250bc847d3e42da07bba377b49d1bbe2f9f5", + "type.structural_with_array": "semantic_v1:4bf065b65cffed98adba483cb9f2f0918ed209b19e86abff4b1608decb6043ac", + "value.dataframe.basic": "pandas_dataframe_v1:3b78d5c87971ff2a6a77d78bdcff43082abe65949109beb13a3ac05ff27ae896", + "value.dataframe.categorical": "pandas_dataframe_v1:a606579b23d3bd0f71bfad866e6c04c23f880407147156979070175ccaef1fec", + "value.dataframe.multiindex": "pandas_dataframe_v1:31ed80230052f045eb29d9fb639b1823a1916266d0a21f2c2005cd3553a570a5", + "value.dataframe.null_object": "pandas_dataframe_v1:b3113f4f20391e3aa7bb65b282a521dbea6a4b8952fcb44fe94c8436ebae4afa", + "value.dataframe.reordered": "pandas_dataframe_v1:343f004b73df6471878165c227d64fc0fc6f4bf2746cf6870c20f4302836d032", + "value.ndarray.aligned_struct": "ndarray_v1:91f015765fc0be7a51bee61db5dc110d703016e0c1c285a9aac7bc3117281a00", + "value.ndarray.big_endian": "ndarray_v1:b552ddc9bdabb59ad235eca436d580eadac8f751dfb815c9294bdf760db9cfdf", + "value.ndarray.empty": "ndarray_v1:19f39d097025397bf15c1c486f46ed68c1e8a8c8288479c4cc5221a2b1cc8589", + "value.ndarray.float64": "ndarray_v1:ae046f92a521b1cedcf7f6f8f610c5424428f7fa636a10f7a92474770b749833", + "value.ndarray.fortran": "ndarray_v1:ebb2d9032d4ce00a58768eb0fe14789f31b69b55a985c28fc3eea1939a24fa36", + "value.ndarray.int32": "ndarray_v1:39b7bc559e6e952d7276e100740db800810c28371e3895fe467e4e0351c26f8a", + "value.ndarray.int64": "ndarray_v1:4018e3021187f9efa736a2a969040563083e455c353dfbd27c4ce0e15aad0d8c", + "value.ndarray.strided_view": "ndarray_v1:ed2e1e0dd1a376dec89828113a11c976e74972b54f58e9a28e0065d2ff88b8e2", + "value.series.named": "pandas_series_v1:1f3b775941f2e6e5bab0fc04e5146e8f4f6ac91f93910eaaa7b4050575c90278", + "value.series.null_arrow_large_string": "pandas_series_v1:d4c7815928e8120c27152365e4d0d84f014c86573c6db8a2e87f48957a55b2cd", + "value.series.null_arrow_null": "pandas_series_v1:c1cc053adf65f211f6c106ffb0bd045e12ccf2e4b31c26f5e390de2a5cf706ef", + "value.series.null_decimal": "pandas_series_v1:f93f4e3e7eb7ce0717d99f4e18afeee8cf262b8c2e8c885f583f80de1dae22f2", + "value.series.unnamed": "pandas_series_v1:a00e416ffd51adc7b54098fda3535e1f4c4c3a6ce4250f3e535493e67c962946" } diff --git a/tests/test_hashing/golden/data/v1/provisional/torch.json b/tests/test_hashing/golden/data/v1/provisional/torch.json new file mode 100644 index 000000000..9cc3340b4 --- /dev/null +++ b/tests/test_hashing/golden/data/v1/provisional/torch.json @@ -0,0 +1,35 @@ +{ + "datagram.content_hash": "semantic_v1:385e4314d082b1fa78f6f627c771909df6aaa8ee43d93be3c978a3813fe2c6d4", + "datagram.pipeline_hash": "semantic_v1:bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e", + "datagram.row[{\"k\":\"r1\"}]._tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "row_0", + "datagram.row[{\"k\":\"r1\"}]._tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "golden_torch_tensor", + "datagram.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:000002873e61c65e46867df1d6374bda92f279cb67df1f41d4e31e4b766ed976ad276f", + "datagram.row[{\"k\":\"r2\"}]._tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "row_1", + "datagram.row[{\"k\":\"r2\"}]._tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "golden_torch_tensor", + "datagram.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:00000291db1a6c2aa90ac8a0c2001e1b5b99d952ba6ee40b360cb00a90528ba80fdf7a", + "datagram.system_tag_columns": [ + "_tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e", + "_tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e" + ], + "single_field.torch_tensor.arrow_type": "extension[large_binary]", + "single_field.torch_tensor.schema_hash": "semantic_v1:29913a88925e1853d82d85ab195a9ea76aa353efb961b18111a886c19239ef92", + "type.torch_tensor": "semantic_v1:f0ca3c55aaa6f3e8566635e7d32425870ff52faa811de28a1034edf143834b6b", + "value.bfloat16": "torch_tensor_v1:c87edfd3c4bb6c0badca59073a741ce4752251b3b3232b94e2b372ec3e9019e1", + "value.bool": "torch_tensor_v1:204ae3923743296d0112c035a62bbc0ff6e0d3941513cb53cc1b9a8bcebfe4a6", + "value.complex32": "torch_tensor_v1:be40d785478a4188be39a70cc7677f8e0b8ee98921b7669600d2d707287d7c16", + "value.conj": "torch_tensor_v1:a8259bb5fae1ac7dd77c7fada523ec47c121ec6426c8ed677c68d42823678468", + "value.empty": "torch_tensor_v1:c6b4b550c3cde5747c25c08fcad7a93f842befbd77bba9d4d69502c06725d8bb", + "value.float64": "torch_tensor_v1:7116fadbe108fc9a6d2519e3c5da9f53da65fb9248c7935ebc87a4b53f18a51c", + "value.float8_e4m3fn": "torch_tensor_v1:6d5725dac3217d06592827bfee12ac8caa9284ec4faa9598038153e4152c8d60", + "value.float8_e4m3fnuz": "torch_tensor_v1:4a225105f7508c03fb419f14ebc37297c60b62bbfeea842b019e7f1d3bfa9bc3", + "value.float8_e5m2": "torch_tensor_v1:3f84967ba8a6b9046ad1181a3369c13ea24579d3f83a9f170ee18e04fa230478", + "value.float8_e5m2fnuz": "torch_tensor_v1:22774bf7f4cbb301aa5d3a7eb9260e98c54e278a8ad3972d17a43f007341f801", + "value.float8_e8m0fnu": "torch_tensor_v1:c72e922887b2260315b085c36c3ab1f56c81649109a6333b49aa3104aa887fe4", + "value.int32": "torch_tensor_v1:ef644e2390862e3a8b2e119bdcbae7760de2de965de79d215d84f83d664e49b4", + "value.int64": "torch_tensor_v1:5f25bb8b0f3ff7be6f0943e9a0e372f182d3021fc0da0ca5b676c895f4967cd9", + "value.non_contiguous": "torch_tensor_v1:1c942233e11cc7336f0a0c37b8c4ec33a640b796ba347f7c8a9daa0765c03621", + "value.parameter": "torch_tensor_v1:63bd8bf6729f9caae5342914286c3b2b7d5c84a2c5fdefed228d0bfc0d1e1161", + "value.requires_grad": "torch_tensor_v1:2d30ceea79c0109cd6200639f466e846db1b17b6b48b4ebeda35e4c75954fbb6", + "value.step_slice": "torch_tensor_v1:e1dd0586c342eb2a495195235bfef1876ce9109b10398fd67be4911e3659deb1", + "value.zero_dim": "torch_tensor_v1:b2f415e6539834843f8d100b2744d7a54a2c18ed1491b8ebdf8b79b00bc183bc" +} diff --git a/tests/test_hashing/golden/data/v1/schema-01.json b/tests/test_hashing/golden/data/v1/schema-01.json index dc5bf49e4..a5f06d3de 100644 --- a/tests/test_hashing/golden/data/v1/schema-01.json +++ b/tests/test_hashing/golden/data/v1/schema-01.json @@ -1,38 +1,6 @@ { "compute_schema_hash.chars_16": "4fff97a50e20afe7", "compute_schema_hash.full": "4fff97a50e20afe712608bdcc95596ad4c50a770b3da70d1a9e6064dc4447eaf", - "derived_source_tags_as_data.named_source_id.content_hash": "semantic_v1:449d23919709e9eca8cb4a629804b8e7366908faf6e61f8cd139791c2dc58552", - "derived_source_tags_as_data.named_source_id.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_0", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000020ca390bc91e4b4d9301afb64c7f53bd90293ce824d71f4dd4c5ae2628f6d93e1", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_1", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000213a205b665ef018579297b571ed5859ca02fb8ce5ef9140da83fbb06d2a6bb16", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "row_2", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived", - "derived_source_tags_as_data.named_source_id.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000020d2eec4dbd9694e33482e1ca86121cbe7992cf801a7d14a43943a5736fac6878", - "derived_source_tags_as_data.named_source_id.source_id": "golden_derived", - "derived_source_tags_as_data.named_source_id.system_tag_columns": [ - "_tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", - "_tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f" - ], - "derived_source_tags_as_data.record_id_column.content_hash": "semantic_v1:b363917eb697abd9de451a08da097c4e5549d05f1c3700aecbd19b9c7df8372d", - "derived_source_tags_as_data.record_id_column.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s1\"}", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s1\"}].data_hash": "arrow_v1:0000020ca390bc91e4b4d9301afb64c7f53bd90293ce824d71f4dd4c5ae2628f6d93e1", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s2\"}", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s2\"}].data_hash": "arrow_v1:00000213a205b665ef018579297b571ed5859ca02fb8ce5ef9140da83fbb06d2a6bb16", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}]._tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "{\"subject\":\"s3\"}", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}]._tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f": "golden_derived_keyed", - "derived_source_tags_as_data.record_id_column.row[{\"subject\":\"s3\"}].data_hash": "arrow_v1:0000020d2eec4dbd9694e33482e1ca86121cbe7992cf801a7d14a43943a5736fac6878", - "derived_source_tags_as_data.record_id_column.source_id": "golden_derived_keyed", - "derived_source_tags_as_data.record_id_column.system_tag_columns": [ - "_tag_source_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", - "_tag_record_id::1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f" - ], "hash_in_key_order.arrow_table.aligned.subject_trial.content_hash": "semantic_v1:d3fc26004f9e5a2df37f8d5ac1b39133218f1c9969456f74e27a85fb10ae2b82", "hash_in_key_order.arrow_table.aligned.subject_trial.source_id": "arrow_table:arrow_v1:000002ec8986aa0bde1c8bfbd374065472a0234b5b011c75dee1c8bd29eed1773330a3", "hash_in_key_order.arrow_table.aligned.trial_subject.content_hash": "semantic_v1:c00c450c7a5b097d0a68241629bfd36ecb3aaaf83015d81be7d7e8e5b5dbe8cd", @@ -107,10 +75,6 @@ "key_policy_identity.arrow_table.key.pipeline_hash": "semantic_v1:df3191f6ead859d54ee25ec5098fa3180fcf68dd311611e06e65f90b9f3f2488", "key_policy_identity.arrow_table.position.content_hash": "semantic_v1:3460a42e1f14d933270904ec20cc532fac33e3a34730a2ef7a4c0d471da9bdf4", "key_policy_identity.arrow_table.position.pipeline_hash": "semantic_v1:df3191f6ead859d54ee25ec5098fa3180fcf68dd311611e06e65f90b9f3f2488", - "key_policy_identity.derived_tags_as_data.key.content_hash": "semantic_v1:a97a9f9dea9306bb23932cb89bac4b8195875efe5bdeb535601d20fe508779fe", - "key_policy_identity.derived_tags_as_data.key.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", - "key_policy_identity.derived_tags_as_data.position.content_hash": "semantic_v1:f8614fbdf134239b1d587a426ae400a02758f08fa5f889c2b0e76493e27fb4e2", - "key_policy_identity.derived_tags_as_data.position.pipeline_hash": "semantic_v1:1fc6bedf22327c3ac80d1b16aa8f8968f7d2397c0f0e73aa0217ec8f685b586f", "key_policy_identity.list.key.content_hash": "semantic_v1:6fe5579e74653616d575c5274fc0a72b4bccc1c46e56a837bdef0f709404df61", "key_policy_identity.list.key.pipeline_hash": "semantic_v1:3f86475d909bc1fee59589c561dcc640d7bad3fc5691efe7011371d0f79b6d7a", "key_policy_identity.list.position.content_hash": "semantic_v1:e2660b0b39a19ac9a65b45ab888a1864f5c510aa18f66e0a5a99db956e11218a", @@ -173,10 +137,6 @@ "multi_field.optional_field": "semantic_v1:a4f77f7aa50ba6ad66b2e0f04fa5acd1374dfd3daa3ad27c724b3a5ae04f54f3", "multi_field.two_scalars": "semantic_v1:a4f77f7aa50ba6ad66b2e0f04fa5acd1374dfd3daa3ad27c724b3a5ae04f54f3", "multi_field.two_scalars_reordered": "semantic_v1:a4f77f7aa50ba6ad66b2e0f04fa5acd1374dfd3daa3ad27c724b3a5ae04f54f3", - "polars_single_field.dataframe.arrow_type": "extension[large_binary]", - "polars_single_field.dataframe.schema_hash": "semantic_v1:5179f982ace7e129eba0284e1cce96024f13550dda078dda7127c0f1175e2241", - "polars_single_field.series.arrow_type": "extension[large_binary]", - "polars_single_field.series.schema_hash": "semantic_v1:74534c6d145d12c1fa306f3808e5063a5b8ca1397460ed275e5a878c411e52bc", "row_identifiers.bool_key.content_hash": "semantic_v1:ce9da188cca90f4f71e07c57dfd60f15322a7b2b0456b3609e1b2aceb37f7f84", "row_identifiers.bool_key.pipeline_hash": "semantic_v1:1c5e40f4e3e2ccf2426b0177485462a39a50da19a1aecda941b65799cd9f022a", "row_identifiers.bool_key.row[{\"subject\":\"s1\"}]._tag_record_id::1c5e40f4e3e2ccf2426b0177485462a39a50da19a1aecda941b65799cd9f022a": "{\"ok\":false}", @@ -267,8 +227,6 @@ "single_field.dataclass_subclass.schema_hash": "semantic_v1:f973407aeac9f4b0638596c960fc87bd649208e62d2b4edb97bc62d431092214", "single_field.dataclass_with_structural.arrow_type": "extension[struct, note: large_string>]", "single_field.dataclass_with_structural.schema_hash": "semantic_v1:8b55de8ae936cb65407691ac901f1401ae34a9fc3e854922874625e3a00e0efc", - "single_field.dataframe.arrow_type": "extension[large_binary]", - "single_field.dataframe.schema_hash": "semantic_v1:40aa05560c2f255b20217e630a5364de3d11d50b690f4ede958ac55e27b541e9", "single_field.dict_str_int.arrow_type": "large_list>", "single_field.dict_str_int.schema_hash": "semantic_v1:fcb96650552f643b8305f148637e5f041ed212c6c9537878ee4cd015679dc364", "single_field.float.arrow_type": "double", @@ -283,8 +241,6 @@ "single_field.list_list_int.schema_hash": "semantic_v1:c9a365eafe251b1bf613758ae3c7b2b72bc949be4c7f35fb8b9250ab88d3429f", "single_field.list_path.arrow_type": "extension[large_list]", "single_field.list_path.schema_hash": "semantic_v1:f3ed652bb38fe0ef6f4dd500885827c0dd0c4c0f2a1ee8295627297da6ea30fd", - "single_field.ndarray.arrow_type": "extension[large_binary]", - "single_field.ndarray.schema_hash": "semantic_v1:c41dc89a193b046553efd1964914f6f41ecaec7a53d023f95580874b8e0e0a20", "single_field.optional_int.arrow_type": "int64", "single_field.optional_int.schema_hash": "semantic_v1:e6bd14f2a40058e5c97af7758fe6544f2723e1657e70f4c2b304368394383323", "single_field.path.arrow_type": "extension[large_string]", @@ -313,8 +269,6 @@ "single_field.structural_twin_ab.schema_hash": "semantic_v1:c1666744c6087e87a852686a3100bbfa33f7afd1b378da0fdb78dda753b72684", "single_field.structural_twin_ba.arrow_type": "extension[struct]", "single_field.structural_twin_ba.schema_hash": "semantic_v1:2b6fa899a985589c3c65b46628bf8d21e97c6b6715d497ebb5814ce535079d6e", - "single_field.structural_with_array.arrow_type": "extension[struct]", - "single_field.structural_with_array.schema_hash": "semantic_v1:799e5e083fb82befdb409b5ded6678117a3741bb5cf83c09fa35ce449abb6bf5", "single_field.tuple_int_str.arrow_type": "struct", "single_field.tuple_int_str.schema_hash": "semantic_v1:962f94c03973da8d3c8b9bf2668a2f5c97be68fd8f2a6e50628f46cf85f7f4e9", "single_field.uuid.arrow_type": "extension[large_binary]", diff --git a/tests/test_hashing/golden/data/v1/semantic-01.json b/tests/test_hashing/golden/data/v1/semantic-01.json index 5e1d966ca..78cd82dcf 100644 --- a/tests/test_hashing/golden/data/v1/semantic-01.json +++ b/tests/test_hashing/golden/data/v1/semantic-01.json @@ -36,13 +36,6 @@ "function.value.defaults": "semantic_v1:6fd6dab5cff8003986bad9ff2ff02a943fd2b857755ee7e3a5d26036709c05e0", "function.value.kinds": "semantic_v1:418c943f60795418e977f3baf27136be860052c190bb7bf4c41e3a7c3cf990d3", "function.value.plain": "semantic_v1:6ae9e5ea388c3c27a267f0e8532fe1086e1d050a19d4ba544ad4fdc9a988da87", - "polars_type.dataframe": "semantic_v1:e924850e67f9d3c6f66abf7f72fe71b131e5e8afb9bc958c135f7b0f5a69636f", - "polars_type.series": "semantic_v1:7c68ad68d1bf959a57401cee2679d3ab01b390d118e091c87f8346cec48ea05e", - "polars_value.empty_with_schema": "polars_dataframe_v1:87cefe5fbb989beba6cda87cc1a334d643b878eccbc113d4daf8f0ba74192d81", - "polars_value.nested_and_categorical": "polars_dataframe_v1:2833764295ce6b6a344c15df742bade6be9f51a84655bb5c2f0d42a0786d1f89", - "polars_value.nulls_and_temporal": "polars_dataframe_v1:fccfc33b3a7f171257b87ff20d260d2221085e48e3740d567681414e5ace589a", - "polars_value.series": "polars_series_v1:9ff68c5024750115e606f8e370ceaa55bcb3305227dc6ad45111adaf5a620d88", - "polars_value.simple": "polars_dataframe_v1:92002a1ced22c899f5662ceb4ed2e435ea2d0dddcf28b489ac3f8c8d5226aadf", "sample_value.bytearray_abc": "semantic_v1:38e0ac3cf5550da3db489ecbe4586c7ca632dac2b6a55fcd7d21488a2c6651a0", "sample_value.bytearray_hello_world": "semantic_v1:249ef98b18f591652b16c496be7adab4da392b582e0081cd3c88f2818c2f7f62", "sample_value.bytes_binary": "semantic_v1:dc35803d716c5122eb7c77735c52223fc1c229bba92f07bb1a9b404510e35936", @@ -78,7 +71,6 @@ "type.dataclass": "semantic_v1:86baa1ef8dbf2518c6dcf7d188f6e20474248e9d8bc08d22b7fa0a4ed98bf8a8", "type.dataclass_subclass": "semantic_v1:a708010250b375859e12f0bf5df84f07aeac185c97dcc7a85431a75b92da7666", "type.dataclass_with_structural": "semantic_v1:82c2bb964c817a345467bb892979c137fc0217fc1cd73a9194a44bcaff0add51", - "type.dataframe": "semantic_v1:6ccd827bb3bccca86e95244612abe2bba6ff60c927ae2336d91380cfb34a8c2c", "type.dict_str_int": "semantic_v1:ff9e57f86530af3e9c566e5f9a7f18f3e76ea850ad2faaed9d7327a23be0754e", "type.float": "semantic_v1:0059c08fc7dfe19dc8d095b7e95d56e8d377bbe49ac30376a00105eca2e7c75f", "type.int": "semantic_v1:24be397c58c33686e96b4f85a9f443fd2483564ec7dee1c14b96da3e60ec16ac", @@ -86,7 +78,6 @@ "type.list_int": "semantic_v1:99d59154b8b33aba4fd19228354e544dd8dab1bc3df585828a9184cec985cd7b", "type.list_list_int": "semantic_v1:3c228b86fae9d07dcc15ec714cd2a45d4fb3701bb07f4804649fc82e08422de0", "type.list_path": "semantic_v1:78d5eb9cfd5b8c211f9a474bd94b0ab3bb1316ec5c0daf8cbbcee94ace82551e", - "type.ndarray": "semantic_v1:6b5d34c828127cad41bb98e65450250bc847d3e42da07bba377b49d1bbe2f9f5", "type.optional_int": "semantic_v1:5c7cfe25678852b8d640987f923bf67041190c175874dbe5b3cc1b3873e83211", "type.path": "semantic_v1:7f0da67eaf9d048c9d1791fbe223333cfcc8018c66878647c8b7ae8571c72bd3", "type.pydantic": "semantic_v1:58c6aad8ca32918a34da1dddb62c72392079b9326b021aa3a4c57de4ae0a4ea8", @@ -101,7 +92,6 @@ "type.structural_same_identity": "semantic_v1:e050877645fb628a5ae83ad6c88398a91f2437a599a65054127056b221077564", "type.structural_twin_ab": "semantic_v1:12ab17179b2f707e3551c93481b7eb7974d79805b2fa6a4e37890014bc8ca62a", "type.structural_twin_ba": "semantic_v1:8f0abe45554d4cd0c68d5c9497a819564f7268cc2631602a2e1db6471f0112c7", - "type.structural_with_array": "semantic_v1:4bf065b65cffed98adba483cb9f2f0918ed209b19e86abff4b1608decb6043ac", "type.tuple_int_str": "semantic_v1:e54881c4461116b6876e308fb4d3cfc57b8143527dd9bdb8580a932de484f08f", "type.uuid": "semantic_v1:763acbee42cb7bd6c7734ad7ca12ab6cb879ace3991e075366b0536bd67556f0", "value.bool.false": "semantic_v1:fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa", @@ -109,11 +99,6 @@ "value.bytearray.binary": "semantic_v1:65d973612e14921165d8f5f5c0e863ac167ba41a44beb65cf3b081aa5afa216d", "value.bytes.binary": "semantic_v1:65d973612e14921165d8f5f5c0e863ac167ba41a44beb65cf3b081aa5afa216d", "value.bytes.empty": "semantic_v1:c58e72f7884ef2a5529c9387b173b8ad5a2055bb0edbd6b63e329b6d8ffc412f", - "value.dataframe.basic": "pandas_dataframe_v1:3b78d5c87971ff2a6a77d78bdcff43082abe65949109beb13a3ac05ff27ae896", - "value.dataframe.categorical": "pandas_dataframe_v1:a606579b23d3bd0f71bfad866e6c04c23f880407147156979070175ccaef1fec", - "value.dataframe.multiindex": "pandas_dataframe_v1:31ed80230052f045eb29d9fb639b1823a1916266d0a21f2c2005cd3553a570a5", - "value.dataframe.null_object": "pandas_dataframe_v1:b3113f4f20391e3aa7bb65b282a521dbea6a4b8952fcb44fe94c8436ebae4afa", - "value.dataframe.reordered": "pandas_dataframe_v1:343f004b73df6471878165c227d64fc0fc6f4bf2746cf6870c20f4302836d032", "value.dict.ab": "semantic_v1:43258cff783fe7036d8a43033f830adfc60ec037382473548ac742b888292777", "value.dict.ba": "semantic_v1:43258cff783fe7036d8a43033f830adfc60ec037382473548ac742b888292777", "value.dict.empty": "semantic_v1:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", @@ -135,21 +120,8 @@ "value.list.mixed": "semantic_v1:05e6eced3c7100adabbd220cc470b1a97e0e39263653ac62da7c950b86f7526c", "value.namedtuple.xy": "semantic_v1:8573505172fe4b9949938d0aee2358b361e51ef007ea7c7519f0cfdefb2de6b0", "value.namedtuple.yx": "semantic_v1:addb076ec3eee640559a2bdf5d8b901dd1f644f83ada7046d12a7792f7b85443", - "value.ndarray.aligned_struct": "ndarray_v1:91f015765fc0be7a51bee61db5dc110d703016e0c1c285a9aac7bc3117281a00", - "value.ndarray.big_endian": "ndarray_v1:b552ddc9bdabb59ad235eca436d580eadac8f751dfb815c9294bdf760db9cfdf", - "value.ndarray.empty": "ndarray_v1:19f39d097025397bf15c1c486f46ed68c1e8a8c8288479c4cc5221a2b1cc8589", - "value.ndarray.float64": "ndarray_v1:ae046f92a521b1cedcf7f6f8f610c5424428f7fa636a10f7a92474770b749833", - "value.ndarray.fortran": "ndarray_v1:ebb2d9032d4ce00a58768eb0fe14789f31b69b55a985c28fc3eea1939a24fa36", - "value.ndarray.int32": "ndarray_v1:39b7bc559e6e952d7276e100740db800810c28371e3895fe467e4e0351c26f8a", - "value.ndarray.int64": "ndarray_v1:4018e3021187f9efa736a2a969040563083e455c353dfbd27c4ce0e15aad0d8c", - "value.ndarray.strided_view": "ndarray_v1:ed2e1e0dd1a376dec89828113a11c976e74972b54f58e9a28e0065d2ff88b8e2", "value.nested": "semantic_v1:1935b97bf8f80e850dbcab19482cacf2af7bab94d73c2c8e6bce44a0cc71c0ff", "value.none": "semantic_v1:74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b", - "value.series.named": "pandas_series_v1:1f3b775941f2e6e5bab0fc04e5146e8f4f6ac91f93910eaaa7b4050575c90278", - "value.series.null_arrow_large_string": "pandas_series_v1:d4c7815928e8120c27152365e4d0d84f014c86573c6db8a2e87f48957a55b2cd", - "value.series.null_arrow_null": "pandas_series_v1:c1cc053adf65f211f6c106ffb0bd045e12ccf2e4b31c26f5e390de2a5cf706ef", - "value.series.null_decimal": "pandas_series_v1:f93f4e3e7eb7ce0717d99f4e18afeee8cf262b8c2e8c885f583f80de1dae22f2", - "value.series.unnamed": "pandas_series_v1:a00e416ffd51adc7b54098fda3535e1f4c4c3a6ce4250f3e535493e67c962946", "value.set.ints": "semantic_v1:d1ff6a34712272cbf01d0bc874fb41db6df312102bd073c95529df6e9ae738bf", "value.set.mixed_str_equal": "semantic_v1:80cf1a4f2d90531693aa75fb5914b400c5c5f9ffe5e4ef75d6610b43840e7cbe", "value.set.strs": "semantic_v1:276451a2b7524da00f8db5457dfdfd234791ad18183360143be382cf2e40b964", diff --git a/tests/test_hashing/golden/data/v1/torch-01.json b/tests/test_hashing/golden/data/v1/torch-01.json index 9cc3340b4..0967ef424 100644 --- a/tests/test_hashing/golden/data/v1/torch-01.json +++ b/tests/test_hashing/golden/data/v1/torch-01.json @@ -1,35 +1 @@ -{ - "datagram.content_hash": "semantic_v1:385e4314d082b1fa78f6f627c771909df6aaa8ee43d93be3c978a3813fe2c6d4", - "datagram.pipeline_hash": "semantic_v1:bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e", - "datagram.row[{\"k\":\"r1\"}]._tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "row_0", - "datagram.row[{\"k\":\"r1\"}]._tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "golden_torch_tensor", - "datagram.row[{\"k\":\"r1\"}].data_hash": "arrow_v1:000002873e61c65e46867df1d6374bda92f279cb67df1f41d4e31e4b766ed976ad276f", - "datagram.row[{\"k\":\"r2\"}]._tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "row_1", - "datagram.row[{\"k\":\"r2\"}]._tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e": "golden_torch_tensor", - "datagram.row[{\"k\":\"r2\"}].data_hash": "arrow_v1:00000291db1a6c2aa90ac8a0c2001e1b5b99d952ba6ee40b360cb00a90528ba80fdf7a", - "datagram.system_tag_columns": [ - "_tag_source_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e", - "_tag_record_id::bfc7294530f474c3fb9e7b41389d74a0bc9ce5f193c38c6a1f12a46d426f858e" - ], - "single_field.torch_tensor.arrow_type": "extension[large_binary]", - "single_field.torch_tensor.schema_hash": "semantic_v1:29913a88925e1853d82d85ab195a9ea76aa353efb961b18111a886c19239ef92", - "type.torch_tensor": "semantic_v1:f0ca3c55aaa6f3e8566635e7d32425870ff52faa811de28a1034edf143834b6b", - "value.bfloat16": "torch_tensor_v1:c87edfd3c4bb6c0badca59073a741ce4752251b3b3232b94e2b372ec3e9019e1", - "value.bool": "torch_tensor_v1:204ae3923743296d0112c035a62bbc0ff6e0d3941513cb53cc1b9a8bcebfe4a6", - "value.complex32": "torch_tensor_v1:be40d785478a4188be39a70cc7677f8e0b8ee98921b7669600d2d707287d7c16", - "value.conj": "torch_tensor_v1:a8259bb5fae1ac7dd77c7fada523ec47c121ec6426c8ed677c68d42823678468", - "value.empty": "torch_tensor_v1:c6b4b550c3cde5747c25c08fcad7a93f842befbd77bba9d4d69502c06725d8bb", - "value.float64": "torch_tensor_v1:7116fadbe108fc9a6d2519e3c5da9f53da65fb9248c7935ebc87a4b53f18a51c", - "value.float8_e4m3fn": "torch_tensor_v1:6d5725dac3217d06592827bfee12ac8caa9284ec4faa9598038153e4152c8d60", - "value.float8_e4m3fnuz": "torch_tensor_v1:4a225105f7508c03fb419f14ebc37297c60b62bbfeea842b019e7f1d3bfa9bc3", - "value.float8_e5m2": "torch_tensor_v1:3f84967ba8a6b9046ad1181a3369c13ea24579d3f83a9f170ee18e04fa230478", - "value.float8_e5m2fnuz": "torch_tensor_v1:22774bf7f4cbb301aa5d3a7eb9260e98c54e278a8ad3972d17a43f007341f801", - "value.float8_e8m0fnu": "torch_tensor_v1:c72e922887b2260315b085c36c3ab1f56c81649109a6333b49aa3104aa887fe4", - "value.int32": "torch_tensor_v1:ef644e2390862e3a8b2e119bdcbae7760de2de965de79d215d84f83d664e49b4", - "value.int64": "torch_tensor_v1:5f25bb8b0f3ff7be6f0943e9a0e372f182d3021fc0da0ca5b676c895f4967cd9", - "value.non_contiguous": "torch_tensor_v1:1c942233e11cc7336f0a0c37b8c4ec33a640b796ba347f7c8a9daa0765c03621", - "value.parameter": "torch_tensor_v1:63bd8bf6729f9caae5342914286c3b2b7d5c84a2c5fdefed228d0bfc0d1e1161", - "value.requires_grad": "torch_tensor_v1:2d30ceea79c0109cd6200639f466e846db1b17b6b48b4ebeda35e4c75954fbb6", - "value.step_slice": "torch_tensor_v1:e1dd0586c342eb2a495195235bfef1876ce9109b10398fd67be4911e3659deb1", - "value.zero_dim": "torch_tensor_v1:b2f415e6539834843f8d100b2744d7a54a2c18ed1491b8ebdf8b79b00bc183bc" -} +{} From c20458881ab17bb91ca22014e906406085bee7c2 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" <> Date: Fri, 20 Nov 2026 22:06:09 -0800 Subject: [PATCH 6/6] fix(provisional): record every identity read, propagate warnings on load, keep PollingSource undeclarable Second Codex review and CodeRabbit on PR 469: - head() of a DerivedSource and of a provisional operator's stream records the use; so does a direct read of a provisional operator's or source's identity structure (each provisional class, RootSource.pipeline_identity_structure, DynamicPodStream). - A ProvisionalHashWarning turned into an error propagates from PipelineJob.load: the reconstruction catches (job sources, resolve_source_from_config, the operator rebuild in pipeline/graph.py, saved-type restoration) re-raise a Warning instead of leaving a source unbound with no error. - DerivedSource.from_config warns and records the use first, so a loaded job over a job node it cannot rebuild warns too. - Only DerivedSource is a declarable provisional source (cases.DECLARABLE_PROVISIONAL_SOURCES); a case building a PollingSource is refused, declared or not. - The guard's limit is stated exactly (a hash cached before a case is not traced), and a test enforces the convention that makes the guard enough: no golden module holds a module-level or cached stream, source, operator, node or job (the two fixture function pods excepted). - golden-hashes.md: provisional sources are in the freeze note. No golden value changes. Refs ITL-1279, ITL-1331 Co-Authored-By: Claude Opus 5.5 --- .zed/rules | 20 ++-- CLAUDE.md | 20 ++-- changelog.d/ITL-1279.md | 8 ++ docs/reference/golden-hashes.md | 53 ++++---- src/orcapod/core/operators/add_tags.py | 1 + src/orcapod/core/operators/batch.py | 1 + src/orcapod/core/operators/filters.py | 1 + src/orcapod/core/operators/group_by.py | 1 + src/orcapod/core/operators/index.py | 1 + src/orcapod/core/operators/mappers.py | 2 + src/orcapod/core/operators/merge_join.py | 1 + src/orcapod/core/operators/pick.py | 1 + .../core/operators/static_output_pod.py | 9 +- src/orcapod/core/operators/tag_by.py | 1 + src/orcapod/core/sources/base.py | 5 +- src/orcapod/core/sources/derived_source.py | 11 ++ src/orcapod/core/sources/polling_source.py | 1 + src/orcapod/core/sources/provisional.py | 6 +- src/orcapod/pipeline/graph.py | 4 + src/orcapod/pipeline/job.py | 5 + src/orcapod/pipeline/serialization.py | 11 +- .../operators/test_provisional_operators.py | 72 +++++++++++ .../sources/test_provisional_sources.py | 113 +++++++++++++++++- tests/test_hashing/golden/cases.py | 47 +++++--- .../test_hashing/golden/test_golden_store.py | 107 +++++++++++++++-- 25 files changed, 431 insertions(+), 71 deletions(-) diff --git a/.zed/rules b/.zed/rules index f98f651ce..3786f6013 100644 --- a/.zed/rules +++ b/.zed/rules @@ -535,13 +535,19 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream of a provisional source is provisional. The warning and the use record are one helper, `utils/provisional.warn_provisional_use` (operators use it too); a source notes its use - again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`; a - `DerivedSource` also on every read of rows), as an operator does where its identity is - read or it is applied (one helper pair, `provisional_class_name` and - `note_provisional_use`). A golden case declares a provisional source as it does an - operator (`provisional=("DerivedSource",)`), and its entries live in the provisional - files; no case builds a `PollingSource` (its pins were removed, ITL-1314). The mark never - enters a hash, an identifier, a config or a stored path. + again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`, the + identity structures; a `DerivedSource` also on every read or `head` of rows, and in + `from_config`, so a loaded job over a job node it cannot rebuild warns too), as an + operator does where its identity is read or it is applied (one helper pair, + `provisional_class_name` and `note_provisional_use`). A `ProvisionalHashWarning` turned + into an error propagates from a load: no reconstruction catch swallows a `Warning`. + A golden case declares a `DerivedSource` as it does an operator + (`provisional=("DerivedSource",)`; `cases.DECLARABLE_PROVISIONAL_SOURCES`), and its + entries live in the provisional files; a case that builds a `PollingSource` is refused, + declared or not (its pins were removed, ITL-1314). The guard sees a provisional object + built or read inside a case, not one behind a hash cached before it, so golden cases + build their pipeline objects inside the case (`test_cases_hold_no_prebuilt_pipeline_objects`). + The mark never enters a hash, an identifier, a config or a stored path. - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/CLAUDE.md b/CLAUDE.md index d26e947dc..76c4387be 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -546,13 +546,19 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream of a provisional source is provisional. The warning and the use record are one helper, `utils/provisional.warn_provisional_use` (operators use it too); a source notes its use - again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`; a - `DerivedSource` also on every read of rows), as an operator does where its identity is - read or it is applied (one helper pair, `provisional_class_name` and - `note_provisional_use`). A golden case declares a provisional source as it does an - operator (`provisional=("DerivedSource",)`), and its entries live in the provisional - files; no case builds a `PollingSource` (its pins were removed, ITL-1314). The mark never - enters a hash, an identifier, a config or a stored path. + again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`, the + identity structures; a `DerivedSource` also on every read or `head` of rows, and in + `from_config`, so a loaded job over a job node it cannot rebuild warns too), as an + operator does where its identity is read or it is applied (one helper pair, + `provisional_class_name` and `note_provisional_use`). A `ProvisionalHashWarning` turned + into an error propagates from a load: no reconstruction catch swallows a `Warning`. + A golden case declares a `DerivedSource` as it does an operator + (`provisional=("DerivedSource",)`; `cases.DECLARABLE_PROVISIONAL_SOURCES`), and its + entries live in the provisional files; a case that builds a `PollingSource` is refused, + declared or not (its pins were removed, ITL-1314). The guard sees a provisional object + built or read inside a case, not one behind a hash cached before it, so golden cases + build their pipeline objects inside the case (`test_cases_hold_no_prebuilt_pipeline_objects`). + The mark never enters a hash, an identifier, a config or a stored path. - The unit of immutability is the golden file. The manifest's `golden.history` (`src/orcapod/contexts/data/.json`) lists every file with the sha256 of its bytes; a release appends a revision with `added: {}`, pinned in diff --git a/changelog.d/ITL-1279.md b/changelog.d/ITL-1279.md index 3f4771b71..b09ad04f5 100644 --- a/changelog.d/ITL-1279.md +++ b/changelog.d/ITL-1279.md @@ -15,6 +15,14 @@ field of one of them, whose identity embeds that type's identifier (ITL-1324). No value changes. +### Fixed + +- **A `ProvisionalHashWarning` turned into an error propagates from `PipelineJob.load`:** + under `warnings.simplefilter("error", ProvisionalHashWarning)`, loading a saved job that + holds a provisional source or operator raises the warning. It was caught as a source that + could not be rebuilt, and the job loaded with that source unbound and no error. + (ITL-1331) + ### Known limitations - **`DerivedSource` is provisional, in both forms:** `node.as_source()` (and diff --git a/docs/reference/golden-hashes.md b/docs/reference/golden-hashes.md index 0a0cbb532..e0784f529 100644 --- a/docs/reference/golden-hashes.md +++ b/docs/reference/golden-hashes.md @@ -24,17 +24,19 @@ wanted on purpose starts a new data context version. It never edits a released v entries that move, each explained. 0.4.0 freezes `v1`. See [Withdrawing a release](#withdrawing-a-release). -!!! note "Provisional operators and library value types are outside the freeze" +!!! note "Provisional operators, sources and library value types are outside the freeze" A provisional operator (`orcapod.operators.PROVISIONAL_OPERATORS`; ITL-1266, ITL-1279) - has an identity that no release freezes yet, and so has a provisional library value type - (`provisional` of `contexts/logical_types.json`: NumPy arrays, torch tensors, pandas and - Polars frames and series; ITL-1324). The golden values of every case that depends on one, - its own hashes and those of every step downstream of it, are in the provisional files, - `data/v1/provisional/.json`. They are computed and checked on every run like every - other value, but no release lists them: they can change in a later release without a new - data context, with the developer's approval of the exact list. So the promise on this page - holds for a pipeline only when it contains neither. See - [Provisional files](#provisional-files). + has an identity that no release freezes yet, and so have a provisional source + (`orcapod.sources.PROVISIONAL_SOURCES`: `DerivedSource` in both forms, plain from + `node.as_source()` and with `tags_as_data`, ITL-1331; `PollingSource`, ITL-1314) and a + provisional library value type (`provisional` of `contexts/logical_types.json`: NumPy + arrays, torch tensors, pandas and Polars frames and series; ITL-1324). The golden values + of every case that depends on one, its own hashes and those of every step downstream of + it, are in the provisional files, `data/v1/provisional/.json` (a `PollingSource` + has none). They are computed and checked on every run like every other value, but no + release lists them: they can change in a later release without a new data context, with + the developer's approval of the exact list. So the promise on this page holds for a + pipeline only when it contains none of them. See [Provisional files](#provisional-files). ## The pieces at a glance @@ -165,17 +167,24 @@ rewrites it in place. (`orcapod.utils.provisional.recording_provisional_uses`), and refuses a case that uses one without declaring it, or that declares a name that is not provisional. The golden test checks that every entry is in the kind of file its case declares. An operator is - recorded when it is built, when its own content or pipeline hash is read, when it is - applied (`process`, its call, a stream method such as `stream.group_by`, - `static_process`), and when a stream it produced is hashed or read; a source when it is - built and when its source id, content or pipeline hash is read (a `DerivedSource` also - when its rows are read); a library value type when it is resolved. So an operator built before the case, at module level, is still - recorded when the case reads its hash or applies it, and a step built in the case + recorded when it is built, when its own content or pipeline hash or identity structure is + read, when it is applied (`process`, its call, a stream method such as `stream.group_by`, + `static_process`), and when a stream it produced is hashed, read or previewed (`head`); a + source when it is built and when its source id, content or pipeline hash or identity + structure is read (a `DerivedSource` also when its rows are read or previewed, and when a + saved one is loaded, also over a job node it cannot rebuild); a library value type when it + is resolved. So an operator or source built before the case, at module level, is still + recorded when the case reads its identity or applies it, and a step built in the case downstream of it reaches it while its own hash is computed. -- **A hash cached before the case.** A stream or job node downstream of a provisional - operator or source that was built and hashed, or computed, before the case answers from its cached - hash or kept result and never reaches it, so nothing is recorded. Cases build - their pipelines inside the case. +- **What the guard sees, and the convention that makes it enough.** The guard sees a + provisional object built or read inside the case, not one hidden behind a hash computed + before the case: a stream, source or job node downstream of a provisional operator or + source that was built and hashed, or computed, before the case answers from its cached + hash or kept result and never reaches it, so nothing is recorded. Recording that would + need the dependency carried through every hash cache, which Orcapod does not do. So every + case builds its sources, operators, pods' inputs and jobs inside the case function, and + `test_golden_store.py` (`test_cases_hold_no_prebuilt_pipeline_objects`) checks that the + golden modules hold no module-level or cached stream, source, operator or job. - **A dependence the record cannot see.** A user class with a field of a provisional library type (the fixture `GoldenWithArray`) embeds that type's identifier in its own identity, but the identity is built once, when the class is registered, and cached: a later use of the @@ -191,7 +200,9 @@ rewrites it in place. `schema:key_policy_identity` (its `derived_tags_as_data.*` entries) and `pipeline:default_source_ids` (its `as_source[...]` entries). - **No `PollingSource` values.** No case builds a `PollingSource` (ITL-1314): its pins were - removed rather than kept provisional. + removed rather than kept provisional, and the tool refuses a case that builds one, declared + or not. Of the provisional sources only `DerivedSource` is declarable + (`cases.DECLARABLE_PROVISIONAL_SOURCES`). - **Today:** 475 entries. The `PolarsFilter` cases (`polars_filter`, `polars_filter_expr`, `polars_filter_expr_job` and the `semantic` case `polars_expr`, 86 entries) moved out of the frozen files with ITL-1266; the cases of the other provisional operators (229 entries) diff --git a/src/orcapod/core/operators/add_tags.py b/src/orcapod/core/operators/add_tags.py index ea377e9e0..7b1ae1801 100644 --- a/src/orcapod/core/operators/add_tags.py +++ b/src/orcapod/core/operators/add_tags.py @@ -158,6 +158,7 @@ def tags(self) -> Mapping[str, TagConstant]: return MappingProxyType(self._tags) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return (self.__class__.__name__, tuple(self._tags.items())) def to_config(self) -> dict[str, Any]: diff --git a/src/orcapod/core/operators/batch.py b/src/orcapod/core/operators/batch.py index 16960108d..879229f58 100644 --- a/src/orcapod/core/operators/batch.py +++ b/src/orcapod/core/operators/batch.py @@ -284,4 +284,5 @@ def to_config(self) -> dict[str, Any]: return config def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return (self.__class__.__name__, self.batch_size, self.drop_partial_batch) diff --git a/src/orcapod/core/operators/filters.py b/src/orcapod/core/operators/filters.py index 45d553f0a..1a3a7f23a 100644 --- a/src/orcapod/core/operators/filters.py +++ b/src/orcapod/core/operators/filters.py @@ -175,6 +175,7 @@ def from_config(cls, config: dict[str, Any]) -> "PolarsFilter": return cls(predicates=predicates, constraints=constraints) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return ( self.__class__.__name__, self.predicates, diff --git a/src/orcapod/core/operators/group_by.py b/src/orcapod/core/operators/group_by.py index 07f7f9e5e..63b5ccf33 100644 --- a/src/orcapod/core/operators/group_by.py +++ b/src/orcapod/core/operators/group_by.py @@ -348,6 +348,7 @@ def __init__( super().__init__(**kwargs) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) # ``member_order`` enters only when given, so a GroupBy without it keeps the # identity it had before the option existed (ITL-1226). identity: tuple[Any, ...] = (self.__class__.__name__, self.by) diff --git a/src/orcapod/core/operators/index.py b/src/orcapod/core/operators/index.py index c8fab2d85..7b2913c82 100644 --- a/src/orcapod/core/operators/index.py +++ b/src/orcapod/core/operators/index.py @@ -84,6 +84,7 @@ def __init__( super().__init__(**kwargs) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return (self.__class__.__name__, self.column, self.i, self.out) def _output_nullable(self) -> bool: diff --git a/src/orcapod/core/operators/mappers.py b/src/orcapod/core/operators/mappers.py index 57b98a2c8..c4c7e4ee9 100644 --- a/src/orcapod/core/operators/mappers.py +++ b/src/orcapod/core/operators/mappers.py @@ -587,6 +587,7 @@ async def async_execute( await output.close() def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) # ``tag_only`` enters only when set, so a plain renaming keeps its identity. return ( self.__class__.__name__, @@ -659,6 +660,7 @@ def to_config(self) -> dict[str, Any]: return config def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return ( self.__class__.__name__, self.name_map, diff --git a/src/orcapod/core/operators/merge_join.py b/src/orcapod/core/operators/merge_join.py index 4477936fe..616b135de 100644 --- a/src/orcapod/core/operators/merge_join.py +++ b/src/orcapod/core/operators/merge_join.py @@ -590,6 +590,7 @@ def binary_static_process( ) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return self.__class__.__name__ def __repr__(self) -> str: diff --git a/src/orcapod/core/operators/pick.py b/src/orcapod/core/operators/pick.py index e92138519..6b3d28e0a 100644 --- a/src/orcapod/core/operators/pick.py +++ b/src/orcapod/core/operators/pick.py @@ -86,6 +86,7 @@ def __init__( super().__init__(**kwargs) def identity_structure(self) -> Any: + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) # fail_on_miss intentionally excluded — it controls error behaviour, # not the functional transformation. return (self.__class__.__name__, self.column, self.key, self.out) diff --git a/src/orcapod/core/operators/static_output_pod.py b/src/orcapod/core/operators/static_output_pod.py index 25ba8750e..c3fcafac0 100644 --- a/src/orcapod/core/operators/static_output_pod.py +++ b/src/orcapod/core/operators/static_output_pod.py @@ -102,8 +102,9 @@ def _note_provisional_identity_use(self) -> None: """Note a use of this operator when it is provisional; never warn. Called where the operator's identity is read (``content_hash``, - ``pipeline_hash``) and where it is applied to streams (``process``, - ``static_process``, a ``DynamicPodStream``'s hashes and reads), so an operator + ``pipeline_hash``, ``identity_structure`` of a provisional operator) and where it + is applied to streams (``process``, ``static_process``, a ``DynamicPodStream``'s + hashes, identity structures, reads and ``head``), so an operator built before a recording (a module-level ``Batch(2)``) is still seen by it (ITL-1279). The same note as ``RootSource._note_provisional_identity_use`` for a provisional source (ITL-1314). The warning stays at construction. The note @@ -874,12 +875,14 @@ def pipeline_hash(self, hasher=None) -> ContentHash: return super().pipeline_hash(hasher) def identity_structure(self) -> Any: + self._pod._note_provisional_identity_use() # a direct read is a use (ITL-1279) structure = (self._pod,) if self._upstreams: structure += (self._pod.argument_symmetry(self._upstreams),) return structure def pipeline_identity_structure(self) -> Any: + self._pod._note_provisional_identity_use() # a direct read is a use (ITL-1279) structure = (self._pod,) if self._upstreams: structure += (self._pod.argument_symmetry(self._upstreams),) @@ -1061,6 +1064,8 @@ def head( or after an input changed, there are no rows. See ``StreamBase.head``. """ check_head_size(n) + # A preview of a kept result is a read: it notes a provisional use (ITL-1279). + self._pod._note_provisional_identity_use() config = ColumnConfig.handle_config(columns, all_info=all_info) had_result = self._cached_stream is not None self._update_cache_status() diff --git a/src/orcapod/core/operators/tag_by.py b/src/orcapod/core/operators/tag_by.py index 8f4e54f63..911fefc36 100644 --- a/src/orcapod/core/operators/tag_by.py +++ b/src/orcapod/core/operators/tag_by.py @@ -94,6 +94,7 @@ def identity_structure(self) -> Any: Returns: ``("TagBy", [names in name order])``. """ + self._note_provisional_identity_use() # a direct read is a use (ITL-1279) return (self.__class__.__name__, list(self.columns)) @override diff --git a/src/orcapod/core/sources/base.py b/src/orcapod/core/sources/base.py index 4a99f33af..3f9cc9fcd 100644 --- a/src/orcapod/core/sources/base.py +++ b/src/orcapod/core/sources/base.py @@ -131,7 +131,8 @@ def _note_provisional_identity_use(self) -> None: """Record a use of this source's identity if it is provisional (ITL-1314). The warning is issued at construction only; the use is recorded wherever the - identity is read (``source_id``, ``content_hash``, ``pipeline_hash``), so the + identity is read (``source_id``, ``content_hash``, ``pipeline_hash``, the identity + structures; ITL-1331), so the golden tool refuses a case that reads a provisional source built before the case ran. The record enters no hash. """ @@ -213,6 +214,7 @@ def identity_structure(self) -> Any: sources, so their records never share a cache (developer, November 16, 2026, ITL-1154). The pipeline hash stays schema-only. """ + self._note_provisional_identity_use() # a direct read is a use (ITL-1331) return ( self.__class__.__name__, self.output_schema(), @@ -265,6 +267,7 @@ def pipeline_identity_structure(self) -> Any: identical schemas share the same pipeline hash and therefore the same pipeline database table. """ + self._note_provisional_identity_use() # a direct read is a use (ITL-1331) tag_schema, data_schema = self.output_schema() return (tag_schema, data_schema) diff --git a/src/orcapod/core/sources/derived_source.py b/src/orcapod/core/sources/derived_source.py index 9a8df680b..b216ed918 100644 --- a/src/orcapod/core/sources/derived_source.py +++ b/src/orcapod/core/sources/derived_source.py @@ -13,6 +13,7 @@ from typing_extensions import override from orcapod.core.sources.base import RootSource +from orcapod.core.sources.provisional import warn_provisional_source from orcapod.core.sources.reload import same_rows from orcapod.core.sources.source_ids import hash_source_id from orcapod.core.sources.stream_builder import ( @@ -33,6 +34,7 @@ from orcapod.types import ColumnConfig, Schema from orcapod.utils import arrow_utils from orcapod.utils.lazy_module import LazyModule +from orcapod.utils.provisional import provisional_class_name if TYPE_CHECKING: import pyarrow as pa @@ -299,6 +301,7 @@ def identity_structure(self) -> Any: Returns: The identity structure. """ + self._note_provisional_identity_use() # a direct read is a use (ITL-1331) if self._tags_as_data is None: # Tied precisely to the specific node's data identity return (self._origin.content_hash(),) @@ -369,6 +372,12 @@ def from_config( """ from orcapod.pipeline.serialization import resolve_source_from_config + # Reading a saved DerivedSource is a use of a provisional source, also when its + # origin (a job node) cannot be rebuilt and the constructor is never reached: a + # loaded job warns for it as for a rebuilt one (ITL-1331). + provisional = provisional_class_name(cls) + if provisional is not None: + warn_provisional_source(provisional) cls.require_saved_source_id(config) if config.get("origin") is None: @@ -631,6 +640,8 @@ def head( its head (see ``StreamBase.head``). """ check_head_size(n) + # A preview is a read of rows: it notes the provisional use (ITL-1331). + self._note_provisional_identity_use() config = ColumnConfig.handle_config(columns, all_info=all_info) origin_kind = "held" if isinstance(self._origin, RootSource) else "stored" if self._tags_as_data is not None and self._cached_stream is not None: diff --git a/src/orcapod/core/sources/polling_source.py b/src/orcapod/core/sources/polling_source.py index ab6402e4c..bc085f0ff 100644 --- a/src/orcapod/core/sources/polling_source.py +++ b/src/orcapod/core/sources/polling_source.py @@ -394,6 +394,7 @@ def identity_structure(self) -> Any: declared in changes no hash (ITL-1271). The key columns keep their order: it is the explicit order of the record id. """ + self._note_provisional_identity_use() # a direct read is a use (ITL-1331) return ( self._impl.identity(), tuple(sorted(self._tag_columns)), diff --git a/src/orcapod/core/sources/provisional.py b/src/orcapod/core/sources/provisional.py index b70b90dc4..ee82a75f6 100644 --- a/src/orcapod/core/sources/provisional.py +++ b/src/orcapod/core/sources/provisional.py @@ -3,9 +3,9 @@ Data context v1 freezes every hash at the 0.4.0 release. A provisional source is outside that freeze: its default source id and its content hash (and so the system-tag values, source-info tokens, stored paths and record ids downstream of it) may still change in a -later release. A golden case that uses one declares it, and its golden values are kept in -the provisional golden files, as for a provisional operator (ITL-1331); a case that uses -one undeclared is refused by the golden tool. +later release. A golden case that uses a ``DerivedSource`` declares it, and its golden +values are kept in the provisional golden files, as for a provisional operator (ITL-1331); +a case that builds a ``PollingSource`` is refused, declared or not (ITL-1314). ``PROVISIONAL_SOURCES`` is the one list. Each listed source also sets the class attribute ``PROVISIONAL = True`` (declared on ``RootSource``); a test checks that the list and the diff --git a/src/orcapod/pipeline/graph.py b/src/orcapod/pipeline/graph.py index f6fdc6e0c..a544e0877 100644 --- a/src/orcapod/pipeline/graph.py +++ b/src/orcapod/pipeline/graph.py @@ -482,6 +482,10 @@ def load(cls, path: str | Path) -> "Pipeline": ) operator = resolve_operator_from_config(op_config) + except Warning: + # A warning turned into an error (a ProvisionalHashWarning + # under an error filter) propagates (ITL-1331). + raise except Exception as exc: logger.warning( "Could not reconstruct operator %r from config — " diff --git a/src/orcapod/pipeline/job.py b/src/orcapod/pipeline/job.py index d6f4b7112..78d07f6e1 100644 --- a/src/orcapod/pipeline/job.py +++ b/src/orcapod/pipeline/job.py @@ -1689,6 +1689,11 @@ def load( spec_name, spec_name, ) + except Warning: + # A warning turned into an error (a ProvisionalHashWarning under an + # error filter) is the caller's request: it propagates, never read as a + # source that could not be rebuilt (ITL-1331). + raise except Exception as exc: logger.warning( "Could not reconstruct source %r (%s) from its saved config: %s. " diff --git a/src/orcapod/pipeline/serialization.py b/src/orcapod/pipeline/serialization.py index 15f8d0b31..941b133fa 100644 --- a/src/orcapod/pipeline/serialization.py +++ b/src/orcapod/pipeline/serialization.py @@ -481,6 +481,10 @@ def resolve_source_from_config( # All sources accept db_registry — always forward it. # Sources that don't embed database references simply ignore it. return cls.from_config(config, db_registry=db_registry) + except Warning: + # A warning turned into an error (a ProvisionalHashWarning under an error + # filter) propagates; it is not a source that could not be rebuilt (ITL-1331). + raise except Exception: if fallback_to_proxy: logger.warning( @@ -830,7 +834,9 @@ def deserialize_schema( ) except LogicalTypeIdentifierError as exc: raise exc.for_column(name) from exc - except SavedSchemaVersionError: + except (SavedSchemaVersionError, Warning): + # A warning turned into an error (a provisional library value type under an + # error filter) propagates (ITL-1331). raise except Exception: result[name] = type_str @@ -900,6 +906,9 @@ def restore(columns: dict[str, str], nullable: list[str] | None) -> Schema: raise exc.for_column(name) from exc except SavedSchemaVersionError as exc: raise SavedSchemaVersionError(f"Column {name!r}: {exc}") from exc + except Warning: + # A warning turned into an error propagates as itself (ITL-1331). + raise except Exception as exc: raise ValueError( f"Column {name!r} has the saved type {type_str!r}, which cannot " diff --git a/tests/test_core/operators/test_provisional_operators.py b/tests/test_core/operators/test_provisional_operators.py index eb2620426..04c0320e5 100644 --- a/tests/test_core/operators/test_provisional_operators.py +++ b/tests/test_core/operators/test_provisional_operators.py @@ -514,6 +514,11 @@ def apply() -> Any: "kept stream rows": lambda: list(kept.iter_data()), "kept stream content hash": kept.content_hash, "kept stream pipeline hash": kept.pipeline_hash, + "operator identity structure": operator.identity_structure, + "operator pipeline identity structure": operator.pipeline_identity_structure, + "kept stream identity structure": kept.identity_structure, + "kept stream pipeline identity structure": kept.pipeline_identity_structure, + "kept stream head": lambda: kept.head(2), } for use, fn in uses.items(): with warnings.catch_warnings(record=True) as caught: @@ -528,3 +533,70 @@ def apply() -> Any: kept.content_hash(), kept.pipeline_hash(), ) + + +@pytest.mark.parametrize("name", sorted(PROVISIONAL_OPERATORS)) +def test_reading_a_provisional_operators_identity_structure_is_a_use(name: str) -> None: + """Every provisional operator, built before the recording: a direct read of its + identity structure or pipeline identity structure notes the use (Codex review 2 of + PR 469), without warning again.""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + if name == "PolarsFilter": + operator: Any = PolarsFilter(constraints={"subject": "s1", "session": 1}) + else: + operator = BY_STREAM_METHOD[name]().producer + for read in (operator.identity_structure, operator.pipeline_identity_structure): + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + _ = read() + assert used == {name}, read + assert _provisional_warnings(caught) == [] + + +def _saved_job(tmp_path: Any, name: str) -> Any: + """A saved job holding the provisional operator ``name`` (Pick and Index are kept + read-only on load, ITL-1326; the others are rebuilt).""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + steps = { + "GroupBy": lambda: _stream().group_by("subject"), + "AddTags": lambda: _stream().add_tags(run=3, cohort="A"), + "Pick": lambda: _lists().pick("meta", "k"), + "Index": lambda: _lists().index("values", 0), + } + job = PipelineJob(name=f"saved_{name}", database=InMemoryArrowDatabase()) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + with job: + _ = steps[name]() + path = tmp_path / f"{name}.json" + job.save(path) + return path + + +@pytest.mark.parametrize("name", ["AddTags", "GroupBy", "Index", "Pick"]) +def test_loading_a_job_under_an_error_filter_raises_the_warning( + tmp_path: Any, name: str +) -> None: + """A ProvisionalHashWarning turned into an error propagates from the load, whether + the operator is rebuilt or kept read-only (Codex review 2 of PR 469); without the + filter the job loads as before.""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + path = _saved_job(tmp_path, name) + for _ in range(2): # every load raises: nothing is recorded as issued + reset_provisional_operator_warnings() + with warnings.catch_warnings(): + warnings.simplefilter("error", ProvisionalHashWarning) + with pytest.raises(ProvisionalHashWarning, match=f"^{name} is provisional"): + _ = PipelineJob.load(path, database=InMemoryArrowDatabase()) + reset_provisional_operator_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + loaded = PipelineJob.load(path, database=InMemoryArrowDatabase()) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [name] + assert loaded.nodes diff --git a/tests/test_core/sources/test_provisional_sources.py b/tests/test_core/sources/test_provisional_sources.py index 58a13a5b1..4f730cdd2 100644 --- a/tests/test_core/sources/test_provisional_sources.py +++ b/tests/test_core/sources/test_provisional_sources.py @@ -158,12 +158,19 @@ def test_behavior_is_unchanged_default_source_id_included() -> None: assert _polling("a").source_id == first.source_id -def test_a_golden_case_can_declare_a_provisional_source() -> None: - """A provisional source is declarable (ITL-1331); no golden case builds a - PollingSource (ITL-1314), which ``test_golden_store`` checks.""" - from tests.test_hashing.golden.cases import declarable_provisional_names +def test_a_golden_case_can_declare_derived_source_but_never_polling_source() -> None: + """DerivedSource is declarable (ITL-1331); a case that builds a PollingSource is + refused, declared or not (ITL-1314; ``test_golden_store``).""" + from tests.test_hashing.golden.cases import ( + DECLARABLE_PROVISIONAL_SOURCES, + declarable_provisional_names, + ) - assert set(PROVISIONAL_SOURCES) <= declarable_provisional_names() + assert DECLARABLE_PROVISIONAL_SOURCES == {"DerivedSource"} + assert DECLARABLE_PROVISIONAL_SOURCES <= set(PROVISIONAL_SOURCES) + assert set(PROVISIONAL_SOURCES) & declarable_provisional_names() == { + "DerivedSource" + } # --------------------------------------------------------------------------- @@ -405,6 +412,9 @@ def test_a_derived_source_built_before_a_recording_is_noted_on_every_use( "pipeline hash": derived.pipeline_hash, "rows": derived.as_table, "iterated": lambda: list(derived.iter_data()), + "head": lambda: derived.head(2), + "identity structure": derived.identity_structure, + "pipeline identity structure": derived.pipeline_identity_structure, } for use, fn in uses.items(): with warnings.catch_warnings(record=True) as caught: @@ -413,3 +423,96 @@ def test_a_derived_source_built_before_a_recording_is_noted_on_every_use( _ = fn() assert used == {"DerivedSource"}, use assert _provisional_warnings(caught) == [], use + + +def test_reading_a_polling_sources_identity_structure_is_a_use() -> None: + """Its own ``identity_structure`` notes the use. (Its pipeline identity structure is + ``RootSource``'s, which needs a schema this stub has not got; the same line is + tested through ``DerivedSource``.)""" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + polling = _polling("a", source_id="polled") + with recording_provisional_uses() as used: + _ = polling.identity_structure() + assert used == {"PollingSource"} + + +# A consumer job over a DerivedSource whose origin is a job node: the saved config holds +# no origin, so the loader cannot rebuild it (the slot stays unbound) and never reaches +# the constructor. Both forms, both node kinds. +NODE_BACKED: dict[str, Any] = { + "plain over the function node": lambda job: job.nodes["total"].as_source(), + "plain over the operator node": lambda job: job.nodes["picked"].as_source(), + "tags_as_data over the operator node": lambda job: job.nodes["picked"].as_source( + tags_as_data=AS_DATA, source_id="picked_copied" + ), +} + + +def _consumer_job(tmp_path: Any, build: Any) -> Any: + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + derived = build(_ran_job()) if build is not None else None + if derived is None: + derived = DerivedSource( + _csv_origin(tmp_path), tags_as_data=AS_DATA, source_id="copied" + ) + job = PipelineJob(name="consumer", database=InMemoryArrowDatabase()) + with job: + _ = derived.select_tag_columns(["subject"], label="consumed") + path = tmp_path / "consumer.json" + job.save(path) + return path + + +@pytest.mark.parametrize("form", sorted(NODE_BACKED)) +def test_a_loaded_job_over_a_node_backed_derived_source_warns( + tmp_path: Any, form: str +) -> None: + """Its origin cannot be rebuilt, but the load still warns once and notes the use + (Codex review 2 of PR 469).""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + path = _consumer_job(tmp_path, NODE_BACKED[form]) + reset_provisional_use_warnings() + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + with recording_provisional_uses() as used: + loaded = PipelineJob.load(path, database=InMemoryArrowDatabase()) + assert [m.split(" ", 1)[0] for m in _provisional_warnings(caught)] == [ + "DerivedSource" + ] + assert "DerivedSource" in used + assert loaded.sources == {} + + +@pytest.mark.parametrize("form", ["over a CSV source", *sorted(NODE_BACKED)]) +def test_loading_a_derived_source_job_under_an_error_filter_raises( + tmp_path: Any, form: str +) -> None: + """A ProvisionalHashWarning turned into an error propagates from the load; it is + never read as a source that could not be rebuilt, which would leave the slot unbound + with no error (Codex review 2 of PR 469). Without the filter the job loads as + before: bound over a CSV source, unbound over a job node.""" + from orcapod import PipelineJob + from orcapod.databases import InMemoryArrowDatabase + + path = _consumer_job(tmp_path, NODE_BACKED.get(form)) + for _ in range(2): + reset_provisional_use_warnings() + with warnings.catch_warnings(): + warnings.simplefilter("error", ProvisionalHashWarning) + with pytest.raises(ProvisionalHashWarning, match="^DerivedSource is"): + _ = PipelineJob.load(path, database=InMemoryArrowDatabase()) + reset_provisional_use_warnings() + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + loaded = PipelineJob.load(path, database=InMemoryArrowDatabase()) + if form == "over a CSV source": + assert isinstance(loaded.sources["copied"], DerivedSource) + else: + assert loaded.sources == {} diff --git a/tests/test_hashing/golden/cases.py b/tests/test_hashing/golden/cases.py index a30712163..3265fbabb 100644 --- a/tests/test_hashing/golden/cases.py +++ b/tests/test_hashing/golden/cases.py @@ -105,15 +105,21 @@ def register(fn: CaseFn) -> CaseFn: return register +# The provisional sources a case may declare: DerivedSource only (ITL-1331). A PollingSource +# is never pinned, declared or not: the developer agreed to no PollingSource pins, and its +# identity is to be redesigned (ITL-1314, ITL-1316). So a case that builds one is refused. +DECLARABLE_PROVISIONAL_SOURCES = frozenset({"DerivedSource"}) + + def declarable_provisional_names() -> frozenset[str]: """The names a case may declare provisional: the provisional operators (ITL-1266), - the provisional sources (ITL-1331) and the provisional library value types, by - extension name (the ``provisional`` list of ``contexts/logical_types.json``; - ITL-1324). No case builds a ``PollingSource`` (ITL-1314): its pins were removed.""" + ``DECLARABLE_PROVISIONAL_SOURCES`` (ITL-1331) and the provisional library value + types, by extension name (the ``provisional`` list of ``contexts/logical_types.json``; + ITL-1324). ``PollingSource`` is not declarable: a case that builds one is refused, + declared or not (ITL-1314).""" import importlib.resources from orcapod.core.operators.provisional import PROVISIONAL_OPERATORS - from orcapod.core.sources.provisional import PROVISIONAL_SOURCES registration = json.loads( importlib.resources.files("orcapod.contexts") @@ -122,7 +128,7 @@ def declarable_provisional_names() -> frozenset[str]: ) return ( frozenset(PROVISIONAL_OPERATORS) - | frozenset(PROVISIONAL_SOURCES) + | DECLARABLE_PROVISIONAL_SOURCES | frozenset(registration.get("provisional", [])) ) @@ -231,18 +237,25 @@ def compute_group_kinds( Each case runs while the library records the provisional features it uses (``orcapod.utils.provisional.recording_provisional_uses``). A provisional operator is - recorded when it is built, when its own ``content_hash`` or ``pipeline_hash`` is read, - when it is applied (``process``, its call, a stream method, ``static_process``), and - when a stream it produced is hashed or read, so also an operator built before the case - (at module level). A provisional library value type is recorded when it is resolved. A - case that uses one it does not declare, or declares a name - ``declarable_provisional_names`` does not hold, is refused. The fixtures are - registered first, outside every record, so registering one is not a case's use. - - Limits: the record sees those uses only, never a hash cached before the case. - A stream or node downstream of a provisional operator that was built and hashed, or - computed, before the case returns its cached hash or kept result without reaching the - operator, so it records nothing: build pipelines inside the case. A user class with a + recorded when it is built, when its own ``content_hash``, ``pipeline_hash`` or + identity structure is read, when it is applied (``process``, its call, a stream + method, ``static_process``), and when a stream it produced is hashed, read or + previewed. A provisional source is recorded when it is built or loaded and when its + ``source_id``, hashes or identity structure is read (a ``DerivedSource`` also when its + rows are read or previewed). So an operator or source built before the case (at module + level) is recorded too. A provisional library value type is recorded when it is + resolved. A case that uses one it does not declare, or declares a name + ``declarable_provisional_names`` does not hold (``PollingSource`` among them), is + refused. The fixtures are registered first, outside every record, so registering one + is not a case's use. + + Limits: the guard sees a provisional object built or read inside the case, not one + hidden behind a hash computed before the case. A stream, source or node downstream of + a provisional operator or source that was built and hashed, or computed, before the + case returns its cached hash or kept result without reaching it, so it records + nothing. The convention that makes the guard enough: every case builds its sources, + operators and jobs inside the case function, which + ``test_golden_store.test_cases_hold_no_prebuilt_pipeline_objects`` checks. A user class with a field of a provisional library type embeds that type's identifier in its identity, which is built once, at registration, and cached; a later use of the class records nothing. Such items are split out by ``provisional_types_of`` instead diff --git a/tests/test_hashing/golden/test_golden_store.py b/tests/test_hashing/golden/test_golden_store.py index 1e3748160..bf5b0a572 100644 --- a/tests/test_hashing/golden/test_golden_store.py +++ b/tests/test_hashing/golden/test_golden_store.py @@ -1195,6 +1195,30 @@ def _prebuilt() -> dict[str, Any]: "MergeJoin", lambda: {"rows": _prebuilt()["merged"].as_table().num_rows}, ), + "unary identity structure": ( + "Batch", + lambda: {"s": repr(_prebuilt()["batch"].identity_structure())}, + ), + "unary pipeline identity structure": ( + "Batch", + lambda: {"s": repr(_prebuilt()["batch"].pipeline_identity_structure())}, + ), + "unary kept stream head": ( + "Batch", + lambda: {"rows": len(_prebuilt()["batched"].head(2).as_table())}, + ), + "binary identity structure": ( + "MergeJoin", + lambda: {"s": repr(_prebuilt()["merge_join"].identity_structure())}, + ), + "binary kept stream identity structure": ( + "MergeJoin", + lambda: {"s": repr(_prebuilt()["merged"].identity_structure())}, + ), + "binary kept stream head": ( + "MergeJoin", + lambda: {"rows": len(_prebuilt()["merged"].head(2).as_table())}, + ), "binary kept stream pipeline hash": ( "MergeJoin", lambda: {"h": _prebuilt()["merged"].pipeline_hash().to_string()}, @@ -1283,9 +1307,8 @@ def fn() -> dict[str, Any]: def test_a_case_building_a_polling_source_is_refused( monkeypatch: pytest.MonkeyPatch, source_ids: tuple[str, ...] ) -> None: - """A case that builds a PollingSource undeclared is refused (ITL-1314). A provisional - source is declarable since ITL-1331, so a declaring case would be provisional; no - repository case declares one (``test_the_repository_cases_declare_exactly_the_measured_cases``).""" + """A case that builds a PollingSource is refused, undeclared and declared (ITL-1314): + only DerivedSource is a declarable source (ITL-1331).""" monkeypatch.setitem( cases._CASES, "semantic", @@ -1300,8 +1323,8 @@ def test_a_case_building_a_polling_source_is_refused( "semantic", [("polling", _building_polling_sources(*source_ids), ("PollingSource",))], ) - _, provisional = cases.compute_group_kinds("semantic") - assert provisional == frozenset({"polling.value"}) + with pytest.raises(ValueError, match=re.escape("declares ['PollingSource']")): + _ = cases.compute_group_kinds("semantic") def _reading_built_polling_sources(read: str, *source_ids: str) -> Any: @@ -1424,7 +1447,8 @@ def test_the_provisional_library_value_types_are_declarable() -> None: cases.TORCH_TENSOR, } <= names assert {"PolarsFilter", "GroupBy", "MergeJoin"} <= names - assert {"DerivedSource", "PollingSource"} <= names + assert "DerivedSource" in names + assert "PollingSource" not in names def _hashing(*values: Any) -> Any: @@ -1546,6 +1570,10 @@ def fn() -> dict[str, Any]: return {"v": source.source_id} if read == "rows": return {"v": source.as_table().num_rows} + if read == "head": + return {"v": len(source.head(2).as_table())} + if read.endswith("identity_structure"): + return {"v": repr(getattr(source, read)())} return {"v": getattr(source, read)().to_string()} return fn @@ -1554,7 +1582,15 @@ def fn() -> dict[str, Any]: _DERIVED_READS = [ (form, read) for form in ("plain", "tags_as_data") - for read in ("source_id", "content_hash", "pipeline_hash", "rows") + for read in ( + "source_id", + "content_hash", + "pipeline_hash", + "rows", + "head", + "identity_structure", + "pipeline_identity_structure", + ) ] @@ -1635,3 +1671,60 @@ def test_split_cases_keep_every_entry_name() -> None: assert not set.intersection(*parts), (group, name) expected = {e for e in pinned[group] if e.startswith(f"{name}.")} assert set.union(*parts) == expected, (group, name) + + +# The module-level function pods of the golden modules: fixtures that hash with their +# module path, so they never move (CLAUDE.md, Golden hash values). A function pod holds +# no input, so it hides no provisional dependency behind a cached hash. +_FIXTURE_FUNCTION_PODS = {("cases", "golden_adjust"), ("cases", "golden_ratio")} + + +def _pipeline_objects(value: Any, depth: int = 0) -> list[str]: + """What in ``value`` (and in a container of it, two levels down) is a stream, source, + operator, pod, node or job, or a cached function.""" + from orcapod.core.base import ContentIdentifiableBase + from orcapod.pipeline.job import PipelineJob + + found: list[str] = [] + if isinstance(value, (ContentIdentifiableBase, PipelineJob)): + found.append(type(value).__name__) + pod = getattr(value, "pod", None) + if pod is not None and not isinstance(value, type): + found.append(f"function pod {type(pod).__name__}") + if hasattr(value, "cache_info"): + found.append("cached function") + if depth < 2 and isinstance(value, (dict, list, tuple, set, frozenset)): + items = value.values() if isinstance(value, dict) else value + for item in items: + found.extend(_pipeline_objects(item, depth + 1)) + return found + + +@pytest.mark.filterwarnings("ignore::orcapod.errors.ProvisionalHashWarning") +def test_cases_hold_no_prebuilt_pipeline_objects() -> None: + """The convention that makes the provisional guard enough (ITL-1279, ITL-1331): the + guard sees a provisional object built or read inside a case, not one hidden behind a + hash computed before it. So no golden module holds a module-level or cached stream, + source, operator, node or job; the shared helpers are functions that build fresh + objects. The only module-level pipeline objects are the fixture function pods.""" + import importlib + import inspect + import pkgutil + + import tests.test_hashing.golden as golden + + found: dict[tuple[str, str], list[str]] = {} + for info in pkgutil.iter_modules(golden.__path__): + if info.name.startswith("test_"): + continue + module = importlib.import_module(f"{golden.__name__}.{info.name}") + for name, value in vars(module).items(): + if inspect.ismodule(value) or inspect.isclass(value): + continue + objects = _pipeline_objects(value) + if objects: + found[(info.name, name)] = objects + assert set(found) == _FIXTURE_FUNCTION_PODS, found + assert all(objects == ["function pod FunctionPod"] for objects in found.values()), ( + found + )