Skip to content

fix(filters): PolarsFilter warns on every construction; Filter is the documented filter (ITL-1296) - #625

Merged
eywalker merged 2 commits into
mainfrom
eywalker/itl-1296-polarsfilter-carries-every-column-through
Nov 28, 2026
Merged

eywalker merged 2 commits into
mainfrom
eywalker/itl-1296-polarsfilter-carries-every-column-through

Conversation

@eywalker

@eywalker eywalker commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What

ITL-1296: PolarsFilter carries every column through Polars, also the columns its predicates do not read, and changes values (a date64 column [1, 86400001] ms comes out [0, 86400000] ms, with no error).

Decision (developer, 2026-11-28): the value fault is deferred; Filter is the filter for users, and PolarsFilter warns whenever one is built. This PR does that. It does not fix PolarsFilter's values, so ITL-1296 stays open.

Changes

  • New PolarsFilterWarning (orcapod.errors, a UserWarning, listed in the API reference). It names the fault (the date64 case), says PolarsFilter is not recommended, and names Filter as the operator to use. It is issued every time, not once per process, and is shown at the user's line; Python's once-per-line rule cannot hide a repeat. The once-per-process ProvisionalHashWarning is unchanged.

  • Which routes warn (one helper, filters.warn_polars_filter_values):

    Route Warns
    PolarsFilter(...) yes, every construction
    stream.polars_filter(...) yes, every call
    PolarsFilter.from_config(config) yes, every call
    serialization.resolve_operator_from_config(config) yes, every call
    PipelineJob.load / Pipeline.load, filter rebuilt from its config yes, once per saved PolarsFilter node, at every load
    PipelineJob.load / Pipeline.load, filter kept read-only (a predicate no config holds; its constructor never runs) yes, once per node, at every load (added in graph.py, so loading is uniform)
    job.run(), job.save(), loaded.run(load_only=True) no

    Under an error filter the construction, and the load, raise.

  • Filter was checked for the same fault and is exact. The probe is kept as tests/test_core/operators/test_filter_exact_values.py: a date64 off midnight, time64[ns] below a microsecond, a float32 signaling NaN, -0.0, decimal128(38, 20) and decimal256(76, 40), Path and UUID logical columns, strings and binaries of both widths, a list and a struct of them; each as plain tag, data and data-tag; two arrangements of the table (16 tag and 16 data columns); a condition that reads none of them, one that reads all of them, and conditions that compare their values; on the sync path, the row channel path (async_execute) and in a job run by either orchestrator. Every kept value equals the input's, bit for bit. A dictionary-encoded column is not in the probe: no stream holds one (it is refused when the source or raw stream is built).

  • Documentation. Filter is the filter shown. The tutorial (Part 3) no longer has a polars_filter sample: a test filter cannot say (arithmetic between columns, a string function) is computed as a column in a function pod and filtered on. The PolarsFilter section of docs/concepts/operators.md opens with a "Not recommended" warning; its two samples that Filter can express are removed, and the two about the identity of an expression predicate stay (they issue the warning when run). Other mentions that pointed users to PolarsFilter now point to Filter (docs/concepts/sources.md, the where() docstring, docs/troubleshooting.md, the Condition.of error text for an argument that is not a condition).

  • Tests. tests/test_core/operators/test_polars_filter_warning.py asserts the warning on every route above. The 50 test files that build a PolarsFilter for another purpose ignore it with a per-file pytestmark and a reason comment; one module builds its cases when collected, where no mark applies, and ignores it for that block only. pytest.ini and conftest.py are unchanged. With -W error::orcapod.errors.PolarsFilterWarning, those files and tests/test_hashing pass.

  • Design-issues log: ITL-1296-PF2, status open (fault deferred, warning added). CLAUDE.md and .zed/rules: one sentence on the rule. Changelog fragment changelog.d/ITL-1296.md.

Review round 1 (finding -> test)

Finding Fix Test
P2: the channel comparison dropped the data half of a data-tag, so a round trip that changed only that half passed Rows are compared as two tables, tags and data apart, keeping both halves of a data-tag; every path (sync, channel, job on both orchestrators) now also compares the rows it hands out one by one test_filter_exact_values.py::test_a_change_of_only_the_data_half_of_a_data_tag_is_caught (the channel writer changed to carry only the data half of t_date64 through Polars: the comparison must fail, and only on the data half) and ::test_a_column_carried_through_polars_is_caught_on_every_path (a filter changed on its table path and its channel path: every path's comparison must fail); ::test_every_path_keeps_every_value passes for the real Filter
P3: unqualified mentions of PolarsFilter in the user documentation Every paragraph, list item and table row that names it says it is not recommended (16 were unqualified); the fluent-method list and the provisional section no longer offer polars_filter, and the provisional section says PolarsFilter has a fault of its own tests/test_docs/test_polars_filter_mentions.py (fails on the 16 blocks of the reviewed head)
P3: the decimal256 statement ("no caller can catch", "abort the process") Corrected in the design entry, the changelog fragment, the warning's docstring and the docs box: Polars panics, the filter raises pyo3_runtime.PanicException, a BaseException that except Exception does not catch and except BaseException does; the process goes on test_polars_filter_warning.py::test_a_decimal256_column_raises_a_panic_exception (in a subprocess)
P3: the decimal fixtures did not fill their declared precision (a Decimal product rounds to 28 digits) The values are written as strings of exactly 38 and 76 digits, 20 and 40 after the point, one negative test_filter_exact_values.py::test_the_decimal_fixtures_fill_their_precision

Filter is still exact under the stronger comparison, on every path.

Not changed

  • PolarsFilter's rows and values, and its identity. No golden value moves (generate_golden_hashes.py --check passes).

Checks

ruff check, ruff format --check, basedpyright (exit 0, 0 errors), the golden check, the changelog and design-issue checks, and the targeted tests (the new files, every file touched, tests/test_hashing, tests/test_docs) pass locally. The full suite is left to CI.

Related: ITL-1296 (stays open), ITL-1374.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • PolarsFilter now warns when created or loaded, including saved filters that aren’t rebuilt. The warning notes that processing columns through Polars may change values or cause errors.
  • Documentation
    • Marked PolarsFilter as not recommended and updated guidance to use Filter for row selection. Added details on possible value changes and errors, including with certain date and decimal values.

… documented filter (ITL-1296)

PolarsFilter passes every column through Polars and can change values (a
date64 off midnight comes back at midnight). That fault is deferred. Building
a PolarsFilter, and loading a saved one (rebuilt or kept read-only), now
issues PolarsFilterWarning every time. Filter was probed for the same fault
and is exact; the probe is kept as a test. The documentation presents Filter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c1040ff and 9e33dec.

Files selected for processing: 72

  • .zed/rules
  • CLAUDE.md
  • README.md
  • changelog.d/ITL-1296.md
  • docs/api/errors.md
  • docs/concepts/identity.md
  • docs/concepts/operators.md
  • docs/concepts/sources.md
  • docs/dev/design_issues/ITL-1296-PF2.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • docs/troubleshooting.md
  • docs/tutorial/00-setup.md
  • docs/tutorial/03-operators.md
  • src/orcapod/core/operators/filters.py
  • src/orcapod/core/sources/spiraldb_table_source.py
  • src/orcapod/errors.py
  • src/orcapod/pipeline/graph.py
  • src/orcapod/types/condition.py
  • test-specification/integration/test_pipeline_flows.py
  • test-specification/integration/test_provenance.py
  • test-specification/property/test_operator_algebra.py
  • test-specification/unit/test_operators.py
  • tests/test_arrays/test_array_operators.py
  • tests/test_channels/test_async_execute.py
  • tests/test_channels/test_pipeline_example.py
  • tests/test_channels/test_record_batch_channels.py
  • tests/test_core/alignment/test_operators.py
  • tests/test_core/data_tags/test_batch.py
  • tests/test_core/data_tags/test_data_tag_order.py
  • tests/test_core/data_tags/test_function_pods.py
  • tests/test_core/data_tags/test_merge_join.py
  • tests/test_core/data_tags/test_merged_source_info.py
  • tests/test_core/data_tags/test_operators.py
  • tests/test_core/data_tags/test_tag_by.py
  • tests/test_core/operators/test_add_tags.py
  • tests/test_core/operators/test_async_sync_equivalence.py
  • tests/test_core/operators/test_empty_inputs.py
  • tests/test_core/operators/test_filter_exact_values.py
  • tests/test_core/operators/test_held_context_keys.py
  • tests/test_core/operators/test_index_pick_arrow_types.py
  • tests/test_core/operators/test_large_normalization.py
  • tests/test_core/operators/test_materialize_source_info.py
  • tests/test_core/operators/test_merge_join_arrow_types.py
  • tests/test_core/operators/test_operator_config.py
  • tests/test_core/operators/test_operators.py
  • tests/test_core/operators/test_polars_filter_expression.py
  • tests/test_core/operators/test_polars_filter_warning.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/operators/test_record_batch_execution.py
  • tests/test_core/operators/test_rejoin.py
  • tests/test_core/operators/test_semijoin_tag_keys.py
  • tests/test_core/operators/test_several_items.py
  • tests/test_core/operators/test_streaming_rejoin.py
  • tests/test_core/side_effect_pod/test_side_effect_stream_as_table.py
  • tests/test_core/streams/test_explain.py
  • tests/test_core/streams/test_head_and_preview.py
  • tests/test_core/streams/test_head_sorting.py
  • tests/test_core/streams/test_pass_through_operator_staleness.py
  • tests/test_core/streams/test_several_items_methods.py
  • tests/test_core/streams/test_stream_convenience_methods.py
  • tests/test_core/test_order_invariance.py
  • tests/test_docs/test_polars_filter_mentions.py
  • tests/test_hashing/test_pydantic_dataclass_hashing.py
  • tests/test_pipeline/test_node_head.py
  • tests/test_pipeline/test_operator_node_async_readback.py
  • tests/test_pipeline/test_operator_node_empty_table_types.py
  • tests/test_pipeline/test_rows_on_read.py
  • tests/test_pipeline/test_stream_transport_equivalence.py
  • tests/test_pipeline/test_zero_row_column_order.py
  • tests/test_pipeline/test_zero_row_non_large_inputs.py
  • tests/test_torch/test_tensor_operators.py

Limit details: You’ve used the included review currently available. Your 96 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 1

CLAUDE.md — auto-discovered
Path-based instructions: 16

Source excerpt: Every fenced `python` block in `README.md`, `docs/index.md`, `docs/getting-started.md`, `docs/troubleshooting.md`, `docs/concepts/`, `docs/reference/` and `docs/tutorial/` is executed by `tests/test_docs/test_doc_samples.py`...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • README.md
  • docs/concepts/identity.md
  • docs/concepts/operators.md
  • docs/concepts/sources.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • docs/troubleshooting.md
  • docs/tutorial/00-setup.md
  • docs/tutorial/03-operators.md
Source excerpt: `docs/` is the only source.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/api/errors.md
  • docs/concepts/identity.md
  • docs/concepts/operators.md
  • docs/concepts/sources.md
  • docs/dev/design_issues/ITL-1296-PF2.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • docs/troubleshooting.md
  • docs/tutorial/00-setup.md
  • docs/tutorial/03-operators.md
Source excerpt: `docs/dev/design_issues/` is the canonical log of known design problems, bugs, and code quality issues: one file per entry (developer, November 11, 2026; ITL-968).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/dev/design_issues/ITL-1296-PF2.md
Source excerpt: Respect the Arrow types the inputs already have, normalized to their large variants (developer, November 10, 2026: large and non-large variants hash identically, so always normalize to large for consistency).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • tests/test_core/operators/test_add_tags.py
  • tests/test_core/operators/test_async_sync_equivalence.py
  • tests/test_core/operators/test_empty_inputs.py
  • tests/test_core/operators/test_filter_exact_values.py
  • tests/test_core/operators/test_held_context_keys.py
  • tests/test_core/operators/test_index_pick_arrow_types.py
  • tests/test_core/operators/test_large_normalization.py
  • tests/test_core/operators/test_materialize_source_info.py
  • tests/test_core/operators/test_merge_join_arrow_types.py
  • tests/test_core/operators/test_operator_config.py
  • tests/test_core/operators/test_operators.py
  • tests/test_core/operators/test_polars_filter_expression.py
  • tests/test_core/operators/test_polars_filter_warning.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/operators/test_record_batch_execution.py
  • tests/test_core/operators/test_rejoin.py
  • tests/test_core/operators/test_semijoin_tag_keys.py
  • tests/test_core/operators/test_several_items.py
  • tests/test_core/operators/test_streaming_rejoin.py
Source excerpt: Tests and golden fixtures that build a source with tag columns pass `tag_only_columns=True` unless the test is about the default (developer, November 16, 2026, ITL-1159).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • tests/test_arrays/test_array_operators.py
  • tests/test_channels/test_async_execute.py
  • tests/test_channels/test_pipeline_example.py
  • tests/test_channels/test_record_batch_channels.py
  • tests/test_core/alignment/test_operators.py
  • tests/test_core/data_tags/test_batch.py
  • tests/test_core/data_tags/test_data_tag_order.py
  • tests/test_core/data_tags/test_function_pods.py
  • tests/test_core/data_tags/test_merge_join.py
  • tests/test_core/data_tags/test_merged_source_info.py
  • tests/test_core/data_tags/test_operators.py
  • tests/test_core/data_tags/test_tag_by.py
  • tests/test_core/operators/test_add_tags.py
  • tests/test_core/operators/test_async_sync_equivalence.py
  • tests/test_core/operators/test_empty_inputs.py
  • tests/test_core/operators/test_filter_exact_values.py
  • tests/test_core/operators/test_held_context_keys.py
  • tests/test_core/operators/test_index_pick_arrow_types.py
  • tests/test_core/operators/test_large_normalization.py
  • tests/test_core/operators/test_materialize_source_info.py
  • tests/test_core/operators/test_merge_join_arrow_types.py
  • tests/test_core/operators/test_operator_config.py
  • tests/test_core/operators/test_operators.py
  • tests/test_core/operators/test_polars_filter_expression.py
  • tests/test_core/operators/test_polars_filter_warning.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/operators/test_record_batch_execution.py
  • tests/test_core/operators/test_rejoin.py
  • tests/test_core/operators/test_semijoin_tag_keys.py
  • tests/test_core/operators/test_several_items.py
  • tests/test_core/operators/test_streaming_rejoin.py
  • tests/test_core/side_effect_pod/test_side_effect_stream_as_table.py
  • tests/test_core/streams/test_explain.py
  • tests/test_core/streams/test_head_and_preview.py
  • tests/test_core/streams/test_head_sorting.py
  • tests/test_core/streams/test_pass_through_operator_staleness.py
  • tests/test_core/streams/test_several_items_methods.py
  • tests/test_core/streams/test_stream_convenience_methods.py
  • tests/test_core/test_order_invariance.py
  • tests/test_docs/test_polars_filter_mentions.py
  • tests/test_hashing/test_pydantic_dataclass_hashing.py
  • tests/test_pipeline/test_node_head.py
  • tests/test_pipeline/test_operator_node_async_readback.py
  • tests/test_pipeline/test_operator_node_empty_table_types.py
  • tests/test_pipeline/test_rows_on_read.py
  • tests/test_pipeline/test_stream_transport_equivalence.py
  • tests/test_pipeline/test_zero_row_column_order.py
  • tests/test_pipeline/test_zero_row_non_large_inputs.py
  • tests/test_torch/test_tensor_operators.py
Source excerpt: A pull request never edits `CHANGELOG.md` (developer, November 11, 2026; ITL-961).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • changelog.d/ITL-1296.md
Source excerpt: An entry is the file `docs/dev/design_issues/-.md` (e.g.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/dev/design_issues/ITL-1296-PF2.md
Source excerpt: **Order never counts, except where you give it** (developer, November 18, 2026, ITL-1271): no operator result and no stream depends on the order of the tags or columns fed into it (declared `tag_columns`, table layout, which...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/concepts/identity.md
Source excerpt: Every place that produces or reads a digest is listed, with its class (into a hash, stored value, in a name, row identifier, id from a recipe, display only), in the "Hash site inventory" of `docs/reference/hashing.md`.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/reference/hashing.md
Source excerpt: The file holds only the text that would have gone under the release heading in `CHANGELOG.md`: the same category headings `CHANGELOG.md` uses (`### Breaking changes and migration`, `### Added`, `### Changed`, `### Fixed`, `#...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • changelog.d/ITL-1296.md
Source excerpt: The API reference is generated from the source by `scripts/docs_site_api.py` (griffe).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/api/errors.md
Source excerpt: When adding or changing any instruction, update BOTH: `.zed/rules` (for Zed AI)

CodeRabbit inference engine (CLAUDE.md)

Files:

  • .zed/rules
Source excerpt: When adding or changing any instruction, update BOTH: `CLAUDE.md` (for Claude Code)

CodeRabbit inference engine (CLAUDE.md)

Files:

  • CLAUDE.md
Source excerpt: Tests use the **public interface** wherever possible (developer, November 10, 2026): drive an operator by calling it, `op(stream)`, and read the result through the stream's public methods.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • tests/test_arrays/test_array_operators.py
  • tests/test_channels/test_async_execute.py
  • tests/test_channels/test_pipeline_example.py
  • tests/test_channels/test_record_batch_channels.py
  • tests/test_core/alignment/test_operators.py
  • tests/test_core/data_tags/test_batch.py
  • tests/test_core/data_tags/test_data_tag_order.py
  • tests/test_core/data_tags/test_function_pods.py
  • tests/test_core/data_tags/test_merge_join.py
  • tests/test_core/data_tags/test_merged_source_info.py
  • tests/test_core/data_tags/test_operators.py
  • tests/test_core/data_tags/test_tag_by.py
  • tests/test_core/operators/test_add_tags.py
  • tests/test_core/operators/test_async_sync_equivalence.py
  • tests/test_core/operators/test_empty_inputs.py
  • tests/test_core/operators/test_filter_exact_values.py
  • tests/test_core/operators/test_held_context_keys.py
  • tests/test_core/operators/test_index_pick_arrow_types.py
  • tests/test_core/operators/test_large_normalization.py
  • tests/test_core/operators/test_materialize_source_info.py
  • tests/test_core/operators/test_merge_join_arrow_types.py
  • tests/test_core/operators/test_operator_config.py
  • tests/test_core/operators/test_operators.py
  • tests/test_core/operators/test_polars_filter_expression.py
  • tests/test_core/operators/test_polars_filter_warning.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/operators/test_record_batch_execution.py
  • tests/test_core/operators/test_rejoin.py
  • tests/test_core/operators/test_semijoin_tag_keys.py
  • tests/test_core/operators/test_several_items.py
  • tests/test_core/operators/test_streaming_rejoin.py
  • tests/test_core/side_effect_pod/test_side_effect_stream_as_table.py
  • tests/test_core/streams/test_explain.py
  • tests/test_core/streams/test_head_and_preview.py
  • tests/test_core/streams/test_head_sorting.py
  • tests/test_core/streams/test_pass_through_operator_staleness.py
  • tests/test_core/streams/test_several_items_methods.py
  • tests/test_core/streams/test_stream_convenience_methods.py
  • tests/test_core/test_order_invariance.py
  • tests/test_docs/test_polars_filter_mentions.py
  • tests/test_hashing/test_pydantic_dataclass_hashing.py
  • tests/test_pipeline/test_node_head.py
  • tests/test_pipeline/test_operator_node_async_readback.py
  • tests/test_pipeline/test_operator_node_empty_table_types.py
  • tests/test_pipeline/test_rows_on_read.py
  • tests/test_pipeline/test_stream_transport_equivalence.py
  • tests/test_pipeline/test_zero_row_column_order.py
  • tests/test_pipeline/test_zero_row_non_large_inputs.py
  • tests/test_torch/test_tensor_operators.py
Source excerpt: What is published is decided in `scripts/docs_site_content.py` (`PUBLISHED_FILES`, `PUBLISHED_FOLDERS`, `EXCLUDED`).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/api/errors.md
  • docs/concepts/identity.md
  • docs/concepts/operators.md
  • docs/concepts/sources.md
  • docs/dev/design_issues/ITL-1296-PF2.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • docs/troubleshooting.md
  • docs/tutorial/00-setup.md
  • docs/tutorial/03-operators.md
Source excerpt: Use [Google style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) Python docstrings everywhere.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • src/orcapod/core/operators/filters.py
  • src/orcapod/core/sources/spiraldb_table_source.py
  • src/orcapod/errors.py
  • src/orcapod/pipeline/graph.py
  • src/orcapod/types/condition.py
  • test-specification/integration/test_pipeline_flows.py
  • test-specification/integration/test_provenance.py
  • test-specification/property/test_operator_algebra.py
  • test-specification/unit/test_operators.py
  • tests/test_arrays/test_array_operators.py
  • tests/test_channels/test_async_execute.py
  • tests/test_channels/test_pipeline_example.py
  • tests/test_channels/test_record_batch_channels.py
  • tests/test_core/alignment/test_operators.py
  • tests/test_core/data_tags/test_batch.py
  • tests/test_core/data_tags/test_data_tag_order.py
  • tests/test_core/data_tags/test_function_pods.py
  • tests/test_core/data_tags/test_merge_join.py
  • tests/test_core/data_tags/test_merged_source_info.py
  • tests/test_core/data_tags/test_operators.py
  • tests/test_core/data_tags/test_tag_by.py
  • tests/test_core/operators/test_add_tags.py
  • tests/test_core/operators/test_async_sync_equivalence.py
  • tests/test_core/operators/test_empty_inputs.py
  • tests/test_core/operators/test_filter_exact_values.py
  • tests/test_core/operators/test_held_context_keys.py
  • tests/test_core/operators/test_index_pick_arrow_types.py
  • tests/test_core/operators/test_large_normalization.py
  • tests/test_core/operators/test_materialize_source_info.py
  • tests/test_core/operators/test_merge_join_arrow_types.py
  • tests/test_core/operators/test_operator_config.py
  • tests/test_core/operators/test_operators.py
  • tests/test_core/operators/test_polars_filter_expression.py
  • tests/test_core/operators/test_polars_filter_warning.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/operators/test_record_batch_execution.py
  • tests/test_core/operators/test_rejoin.py
  • tests/test_core/operators/test_semijoin_tag_keys.py
  • tests/test_core/operators/test_several_items.py
  • tests/test_core/operators/test_streaming_rejoin.py
  • tests/test_core/side_effect_pod/test_side_effect_stream_as_table.py
  • tests/test_core/streams/test_explain.py
  • tests/test_core/streams/test_head_and_preview.py
  • tests/test_core/streams/test_head_sorting.py
  • tests/test_core/streams/test_pass_through_operator_staleness.py
  • tests/test_core/streams/test_several_items_methods.py
  • tests/test_core/streams/test_stream_convenience_methods.py
  • tests/test_core/test_order_invariance.py
  • tests/test_docs/test_polars_filter_mentions.py
  • tests/test_hashing/test_pydantic_dataclass_hashing.py
  • tests/test_pipeline/test_node_head.py
  • tests/test_pipeline/test_operator_node_async_readback.py
  • tests/test_pipeline/test_operator_node_empty_table_types.py
  • tests/test_pipeline/test_rows_on_read.py
  • tests/test_pipeline/test_stream_transport_equivalence.py
  • tests/test_pipeline/test_zero_row_column_order.py
  • tests/test_pipeline/test_zero_row_non_large_inputs.py
  • tests/test_torch/test_tensor_operators.py
Learnings: 1

Common learnings

Learnt from: CR
Repo: metamorphic-labs/orcapod-python

Timestamp: 2026-11-28T08:06:26.203Z
Learning: Source excerpt:
# Claude Code instructions for orcapod-python

## Development documents

Documents written during development are kept in the repository, under `docs/dev/`
(developer, November 16, 2026; ITL-1169):

- Never put them in the published documentation (`docs/` outside `docs/dev/`) or at the top
  level of the repository. There is no top-level `superpowers/`; `scripts/design_issues.py
  --check` refuses one.
Learnt from: CR
Repo: metamorphic-labs/orcapod-python

Timestamp: 2026-11-28T08:06:26.203Z
Learning: Source excerpt:
# Claude Code instructions for orcapod-python

## Architecture overview

### Arrow types

Respect the Arrow types the inputs already have, normalized to their large variants (developer,
November 10, 2026: large and non-large variants hash identically, so always normalize to large
for consistency). Infer an Arrow type from Python values only when no Arrow type is known, and
then through the data context's type converter — never call `pa.array(values)` /
`pa.Table.from_pylist(rows)` without a type for a column whose input type is known, because
inference widens `int8` to `int64`, `float32` to `double`, and takes decimal precision from the
data. The rules:

- Every output column takes the large-normalized form of its input type
  (`arrow_utils.normalize_to_large_types`: `string` to `large_string`, `binary` to `large_binary`, `list`
  to `large_list`, recursively). Width, nullability and logical (extension) types are never
  changed, so `int8` stays `int8`. Sources refuse A...
ast-grep (0.51.3)

tests/test_core/operators/test_polars_filter_warning.py

[error] 295-302: Command coming from incoming request
Context: subprocess.run(
[sys.executable, "-c", _DECIMAL256_SCRIPT],
env=env,
capture_output=True,
text=True,
timeout=120,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

Walkthrough

The change adds PolarsFilterWarning on construction and saved-job loading, adds tests for warning behavior and Filter value preservation, and updates documentation to describe PolarsFilter caveats and recommend Filter.

Changes: PolarsFilter warning and guidance

Layer / File(s) Summary
Warning contract, emission, and tests
src/orcapod/errors.py, src/orcapod/core/operators/filters.py, src/orcapod/pipeline/graph.py, tests/test_core/operators/test_polars_filter_warning.py, tests/**, test-specification/**
Construction and saved-job loading emit PolarsFilterWarning, including for read-only saved nodes. Dedicated tests check warning frequency, warning locations, filtering, and error behavior. Other test modules suppress this warning.
Filter value-preservation tests
tests/test_core/operators/test_filter_exact_values.py
New tests compare Filter outputs with kept input values across multiple Arrow types and execution paths. Additional checks confirm the comparisons detect changes from a Polars round trip.
Warnings and user guidance
.zed/rules, CLAUDE.md, README.md, changelog.d/*, docs/**, src/orcapod/core/sources/spiraldb_table_source.py, src/orcapod/types/condition.py, tests/test_docs/*
Documentation describes PolarsFilter’s possible value changes, warning behavior, and Filter alternatives. It marks PolarsFilter as not recommended and records the decimal256 panic caveat.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Possibly related PRs

  • metamorphic-labs/orcapod-python#498: Updates tutorials, concept pages, and API references to explain stream.filter and Filter, which this PR also presents as the recommended alternative to PolarsFilter.
Merge Risk: Minimal · up to 9e33d

This change warns users when they build or load a PolarsFilter and points them to Filter, which preserves values. Nothing in the supplied evidence shows a behavior regression, so it is ready to merge.

Security architecture risk: Minimal · up to 9e33d

Saved pipelines that use PolarsFilter now warn when opened and may be rejected if warnings are treated as errors. That rejection happens before a partial pipeline is returned. The warning does not fix the existing value-conversion issue; Filter remains the recommended operator.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — A saved operator class name can select the new diagnostic on the existing load path. The warning body is fixed and does not interpolate the saved descriptor or row values.

Trust Boundaries and Controls

  • observed — The read-only warning branch invokes the diagnostic after the existing resolver has failed to rebuild the operator. It does not turn a read-only node into an executable operator or change the job loader's requirement that database connectors be supplied by the caller.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the fix scope (filters), the main behavior change (PolarsFilter now warns on every construction), and the documentation change (Filter is the documented filter), with the ticket refere…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix scope (filters), the main behavior change (PolarsFilter now warns on every construction), and the documentation change (Filter is the documented filter), with the ticket reference ITL-1296. The changeset matches: PolarsFilterWarning is added and emitted on construction and load, and docs, tests, and changelog point users to Filter. The title is specific and accurate, though the 98-character length is slightly long.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

…ct the decimal256 text (ITL-1296)

Review of PR 625. The channel comparison dropped the data half of a data-tag;
rows are now compared as tag and data tables apart on every path, and tests
that carry one column through Polars require every path's comparison to fail.
The decimal fixtures fill their declared precision. A decimal256 column makes
PolarsFilter raise pyo3's PanicException (a BaseException), not abort: the
texts say so and a subprocess test pins it. Every user-doc mention of
PolarsFilter says it is not recommended, checked by a docs test.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@eywalker
eywalker merged commit eaa8cdd into main Nov 28, 2026
10 checks passed
@eywalker
eywalker deleted the eywalker/itl-1296-polarsfilter-carries-every-column-through branch November 28, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant