Repository navigation
Fix native length planning for events without primary keys - #341
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Change mapObserved #339 regression: length planning inserted an optional PK into a native sequence output projection, rejecting valid keyless events. The length input already supplies all declared fields, and token metadata uses native node IDs. The initial timestamp fallback was removed. This deliberately makes empty sequence output projections valid for both public
Verification: 202 affected Python tests pass, including all7 tests in test_temporal_query_shapes.py. The old refusal test reproduced2 failures locally and in CI before being updated; it is replaced with stronger result assertions, not deleted. Added constant-only tests also pass. The same Rust source/library passed288 library tests. Modified Python runtime/API/shape tests pass Ruff; native aggregate test lint has one unchanged baseline PLC0206 on unrelated code. Whitespace checks pass. Exact focused command in the prepared source/matching-native environment: |
|
test_temporal_query_shapes.py:153-162 (test_zero_column_sequence_is_refused) still expects the refusal this PR removes. |
|
engines/diskgraph.py:2276-2278 still adds a placeholder column for constant-only events, with an out-of-date comment and or an event with no key, no clock and no stored field, that placeholder is None; |
Fix a #339 regression where native length planning unconditionally projected an event primary key, rejecting valid keyless tables.
Length-only sequence outputs now carry native row IDs, offsets and row counts without dummy PK or timestamp value columns. Token costs use node-ID metadata; direct validity checks project only their declared input fields. The ordinary compiler also stops adding a placeholder for constant-only events.
This intentionally extends the shared
query_temporal/query_temporal_lengthscontract to accept empty sequence output projections. Both reuse existing Arrow row-count handling; a length-only bypass would add a second admission rule for the same supported result shape. Frame-level PK/clock reads needed for deterministic ordering and temporal filtering remain unchanged. Existing chronological EventSource clock validation remains unchanged.Validation: 202 focused Python tests pass with the matching native library, including the complete temporal-query-shapes file (7 passed). The old zero-column refusal test now verifies identities/row counts/lengths for empty and nonempty results through both public methods. Coverage also includes constant-only keyless events, four other row representations, Packed/Padded layouts, 128-anchor parallel pools and epoch-two cache reuse. Direct generic queries cover a real no-PK/no-clock index with zero decoded values. Rust library tests: 288 passed; Rust source is unchanged since that run.
Modified runtime/API/shape-test lint and whitespace checks pass. The aggregate-program test module retains one unchanged baseline PLC0206 diagnostic.
Change map
#341 (comment)