Repository navigation
fix(join): reject mismatched logical type identifiers - #508
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Type comparison and conflict details src/orcapod/utils/arrow_utils.py, src/orcapod/core/nodes/function_node.py, src/orcapod/core/operators/base.py, changelog.d/ITL-1380.md, docs/dev/design_issues/ITL-1380-JE1.md |
shared_arrow_type now checks ordered extension identifiers after normalization. Conflict messages show formatted Arrow types. The changelog and design issue document the checks. |
Join compatibility tests tests/test_core/operators/several_items.py, tests/test_core/operators/test_join_logical_types.py |
Tests cover matching and mismatched identifiers across join operators, nested types, execution modes, and input order. Additional tests check joins on built-in Path keys. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- metamorphic-labs/orcapod-python#280: Defines the normalized shared-type rule for Join keys, which this change extends with logical-identifier checks.
- metamorphic-labs/orcapod-python#278: Updates MergeJoin type validation for shared tags and colliding columns, the same validation this change extends.
- metamorphic-labs/orcapod-python#480: Updates Rejoin shared-column type checks, which this change extends with logical-identifier checks.
Merge Risk: 
Minimal · up to 7a401
-
Joins and row-table reconstruction now reject columns whose extension types differ in serialized parameters, and the error shows both types. No merge-blocking risk was found.
Security architecture risk: 
Minimal · up to 7a401
-
The change prevents incompatible logical types from being combined. It does not add an access path or change how data is stored or deployed. Validation errors include more type detail, but no new disclosure across an access boundary was established.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- observed — The flagged table constructors build test inputs, and the flagged extension serializer belongs to a test type installed through a pytest fixture. These declarations do not expose a production parser or endpoint.
Trust Boundaries and Controls
- observed — The changed validation messages include both extension names and full metadata bytes in reversible hex. The inspected paths raise an exception to the caller; whether a downstream application forwards that detail to logs or clients was not established.
Hardening Proposals
- proposed — If an embedding application forwards validation errors to a less-trusted audience, keep the column name and mismatch reason but omit raw extension metadata from that response.
-
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title "fix(join): reject mismatched logical type identifiers" matches the main change. The changeset makes shared Arrow extension types require matching logical type identifiers in joins, MergeJoin, SemiJoin, and row-table reconstruction (function_node._concat_row_tables). The title names the fix, the affected area (join), and the core behavior. It is concise and uses a conventional commit format.
-
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
- Mode: Review on demand
- Reviewed files: 7
- Charged: $1.75
- View usage details
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.
Codecov Report❌ Patch coverage is
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Fixes ITL-1380
PyArrow can consider two instances of the same Python extension type class equal even when they serialize different parameters. Joins could then match keys with different logical types, and MergeJoin could pass incompatible colliding data columns into aggregation.
Shared-type checking now requires both Arrow equality after large normalization and identical logical type identifiers throughout the type tree. Validation errors identify the column and include the full identifiers from each input.
core/operators/base.require_shared_arrow_typeInputValidationErrorfor identifier mismatches and shows both input types with their logical identifiers.JoinMergeJoinSemiJoinRejoincore/nodes/function_node._concat_row_tablesThe regression tests exercise both input orders, two- and three-input joins, and top-level and nested extension types. The frozen golden values match.
Generated with Codex on behalf of the developer
Summary by CodeRabbit