Repository navigation
fix(executor): order strings lexicographically in comparison predicates - #312
Merged
adityamukho merged 1 commit intoAug 7, 2026
Merged
Conversation
Every ordering predicate went through to_float_pair, which returns Err for non-numeric operands, so comparing two strings matched no rows: [?e :at ?d] [(>= ?d "2026-01-01")] -> no results [?e :at ?d] [(< ?d "2026-01-01")] -> no results Both directions empty means the filter was not partitioning the relation, it was discarding it. ISO-8601 timestamps stored as strings are the common way to hit this. The engine already orders strings elsewhere: value_lt backs min/max (functions.rs) and value_cmp backs :order-by (executor.rs:1624), both using lexicographic Ord. Only the predicate path disagreed, so the same two strings ordered one way in an aggregate and not at all in a filter. This aligns the predicate path with the rest of the engine rather than introducing a new ordering. Deliberately unchanged: - mixed-type comparison (string vs number) is still Err, as covered by test_eval_type_mismatch_comparison_is_err - NaN operands still compare false for all four operators, preserved by mapping partial_cmp's None to false rather than propagating an error
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
adityamukho
approved these changes
Aug 7, 2026
adityamukho
added a commit
that referenced
this pull request
Aug 10, 2026
The report was last synced at v1.2.0 and had drifted well past this release's own changes, so this is a complete refresh rather than a delta. Totals: 974 -> 998 (990 passing, 8 ignored). Per-suite counts corrected against an actual run: unit 653 -> 663, retraction 7 -> 8, predicate-expression 28 -> 32 (#312), magic sets 5 -> 7, plus section headers for complex queries (10 -> 11), bi-temporal (10 -> 12), window functions (12 -> 14) and UDFs (9 -> 10). The Test Execution block was the worst of it: it claimed 216 unit tests, and six of its `--test` targets used names that no longer resolve (`bitemporal`, `complex_queries`, ...). Names and counts now match `cargo test`, and the nine suites that were missing entirely (disjunction, temporal metadata, production patterns, error handling, grammar conformance, magic sets, cross-platform compat) are listed. "What's Not Tested Yet" listed disjunction, prepared statements and temporal pseudo-attributes as pending; all three shipped in Phase 7.3-7.8. Replaced with the actual roadmap gaps (#182, #183, #277, #241, #185) and a note that the procfs-only limit on stale-lock reclamation is a real, documented constraint. Adds a v1.2.2 section covering #312 and #304, and documents the three new FileLock tests under Storage Backends. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRGNkzJc5FdfpbzAh4ZZzK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every ordering predicate went through
to_float_pair, which returnsErrfor non-numeric operands, so comparing two strings matched no rows:Both directions empty means the filter was not partitioning the relation, it was discarding it. ISO-8601 timestamps stored as strings are the common way to hit this.
The engine already orders strings elsewhere:
value_ltbacksmin/max(functions.rs) andvalue_cmpbacks:order-by(executor.rs:1624), both using lexicographicOrd. Only the predicate path disagreed, so the same two strings ordered one way in an aggregate and not at all in a filter. This aligns the predicate path with the rest of the engine rather than introducing a new ordering.Deliberately unchanged:
Err, as covered bytest_eval_type_mismatch_comparison_is_err.partial_cmp'sNonetofalserather than propagating an error.Fixes # (issue number, if applicable)
Type of change
Checklist
cargo testpassescargo clippy -- -D warningsis cleancargo fmt --checkpassesunwrap()/expect()in library code pathsCHANGELOG.mdupdated underUnreleasedNotes for reviewer
This changes the behavior of queries, which is arguably a breaking change — but that behavior was incorrect and undesirable, so I would call this a bugfix. No migration is required.