Repository navigation
Support WITH TIES for negative LIMIT - #100930
Conversation
|
Workflow [PR], commit [e170290] Summary: ✅
AI ReviewSummaryThis PR adds Missing context / blind spots
Final Verdict✅ No new blocking findings. |
WITH TIES for Negative LIMITWITH TIES for negative LIMIT
|
@groeneai Why the Darwin fast test failing? |
|
@nihalzp It is the macOS loopback gap, not your The arm_darwin runner binds only -> Failing: Established pattern: your earlier negative-limit distributed tests are already skipped on Darwin for the same reason ( Longer term, #107435 aliases |
…-ties # Conflicts: # ci/defs/darwin.skip
Address the AI Review concern about cross-version query-plan serialization of negative `LIMIT` `WITH TIES`. The trailing `SortDescription` payload is gated by bit 0 of the leading `flags` byte, which has been part of the `NegativeLimitStep` wire format since negative `LIMIT` was introduced. The byte stream is self-describing, so a reader that understands the `flags` byte always knows whether the trailing payload follows - there is no position from which the rest of the plan could be decoded incorrectly. A server that predates `WITH TIES` rejects a non-zero `flags` value with `CORRUPTED_DATA` before reading `limit`/`offset`, so a newer initiator that sends a `WITH TIES` negative-`LIMIT` plan to it fails closed. This is intentionally finer-grained than bumping `DBMS_QUERY_PLAN_SERIALIZATION_VERSION`, which would reject every serialized plan from the newer initiator, including plain negative `LIMIT`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 306/313 (97.76%) · Uncovered code |
f5c5c61
…-ties Support `WITH TIES` for negative `LIMIT`
The following missing
WITH TIESfor negative limit is now supported:It uses a very memory efficient algorithm so that we only ever keep chunks that we really need in memory and uses binary search to later find the cut point of the run of equal keys instead of doing linear scan.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add support for
WITH TIESfor negativeLIMIT.Documentation entry for user-facing changes
Version info
26.7.1.433(included in26.7and later)