Skip to content

_split_ors crashes sorting range branches#71

Merged
roed314 merged 1 commit into
roed314:masterfrom
roed-math:fix/split-ors
Jul 20, 2026
Merged

_split_ors crashes sorting range branches#71
roed314 merged 1 commit into
roed314:masterfrom
roed-math:fix/split-ors

Conversation

@roed-math

Copy link
Copy Markdown

When a query with $or branches is split for sorted execution, the branch queries were sorted by their raw value for the sort column — a TypeError as soon as any branch's value is a range dictionary ({"$or": [{"n": {"$lt": 3}}, {"n": {"$gt": 197}}]}). Branches with no natural position now fall back to a deterministic string ordering instead of crashing.


Split out of #60 (one PR per issue). This branch carries only this issue's fix and its tests; the rest of the known-bug inventory stays xfailed, so the full suite is green here and the strict markers guarantee no cross-issue leakage.

When a query with $or branches is split for sorted execution, the branch queries were sorted by their raw value for the sort column — a TypeError as soon as any branch's value is a range dictionary ({"$or": [{"n": {"$lt": 3}}, {"n": {"$gt": 197}}]}). Branches with no natural position now fall back to a deterministic string ordering instead of crashing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@roed314
roed314 merged commit b1c2df9 into roed314:master Jul 20, 2026
16 checks passed
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.

2 participants