Repository navigation
refactor(function_pod)!: rename the call keyword strict to strict_columns (ITL-1585) - #621
Conversation
…umns (ITL-1585) BREAKING CHANGE: use strict_columns=True for exact function pod input columns.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fixes ITL-1585
Rename the function pod call keyword to
strict_columnsbefore 0.4.0 so callers can tell it validates input column names. Usepod(a, b, strict_columns=True)to reject extra data columns. The default still drops extra data columns with one automatic select. The old keyword raises Python's unexpected-keywordTypeError. Pod identity, hashes, and stored data are unaffected.Updated the diagnostic, docs, examples, and tests for direct, wrapped, cached, and decorator-created pods. The migration is recorded in
changelog.d/ITL-1585.md.Audit of
strictinsrc/orcapodsrc/orcapodcore/function_pod.py—_FunctionPodBase.__call__,FunctionPod.__call__, and the data-tag diagnosticstrict_columnscore/operators/column_selection.pySelectTagColumns,SelectDataColumns,SelectColumns,DropTagColumns,DropDataColumns, andDropColumnsreject missing names or names outside the selected role.strictis a config key and part of operator identity.core/operators/mappers.py,pipeline/provenance.py(mapper planning docs)MapTags,MapData, andMapColumnsreject mapping keys that do not exist in the expected role.strictis a config key and part of operator identity.core/streams/base.py,protocols/core_protocols/streams.pycore/function_pod.py,core/nodes/{function_node,operator_node,source_node}.py,core/operators/{add_tags,group_by,static_output_pod}.py,core/sources/{display_names,spiraldb_table_source}.py,core/streams/{base,view}.py,databases/_row_index.py,logical_types/{numpy_type,torch_type}.pyzip(strict=True)checks that its iterables have equal lengths.config.py,errors.py,semantic_types/universal_converter.py"strict"time-zone policy rejects naive datetimes.hashing/versioned_hashers.py,hashing/semantic_hashing/{semantic_hasher,content_identifiable_mixin,encoded,builtin_handlers}.pyhashing/{arrow_hashers,orcapod_table,pandas_value_hash,starfix_digest}.py,hashing/semantic_hashing/{builtin_handlers,torch_handler}.py,logical_types/{numpy_type,polars_type,torch_type}.py,pipeline/provenance.py(value comparisons),protocols/hashing_protocols.py,contexts/data/v1.jsonhashing/semantic_hashing/polars_expr.pyutils/arrow_utils.pycore/nodes/source_node.py(bind docs)logical_types/registry.pyThe test-only
xfail(strict=True)markers are unchanged.Verification
Review follow-up
strict_columns=True. Checked all fragments for stale function pod call examples and verified thatuv run python scripts/assemble_changelog.py --checkpassed.Summary by CodeRabbit
stricttostrict_columns. Usestrict_columns=Trueto reject extra input columns; by default, unused columns are automatically dropped..process()uses an exact column contract.