fix: preserve vector-first ANN query plan - #257
Conversation
|
Remote validation for the exact PR commit For transparency, the first Windows attempt hit the existing 5-second cleanup timeout in |
|
Hi @EyJunge1, when convenient, could you independently review this PR and the related diagnostic fix in #258? You are the recent merger for the Turso, auto-capture, dependency, and v2.24.x release work, so these two paths align with your recent context. Both PRs are limited to two files, remain mergeable, and have exact-SHA six-platform package-smoke evidence. I will not self-approve or merge either change. |
|
Thanks for the ping! Honestly, I'm no longer maintaining this project and don't have the time to give this PR a proper review. Better to loop in one of the active maintainers who can do it justice. Appreciate your understanding. |
|
Fresh validation after updating this branch to cumulative latest |
Review — PR #257: "fix: preserve vector-first ANN query plan"Verdict: SHIP. Verified the planner-barrier fix against real libSQL. Minimal, correct, no blast radius. The fix: What is actually fixed (the interesting part)Only the filtered branch was broken. Confirmed with The unfiltered branch already picked Why it is safeCROSS JOIN with an ON clause is semantically identical to INNER JOIN — it only constrains planner join order, not the result set. Verified:
On the testThe added test ( Optional hardening (not required): add an Merge gate
Merge as-is. Closes #247 properly. (Verified via static code + EXPLAIN QUERY PLAN + real execution; live behavior across SQLite versions relies on the CROSS-JOIN planner-barrier semantics, which are standard SQLite.) |
|
Thanks for the thorough independent review and the real-libSQL plan verification. I agree the All checks remain green. Since this is my PR, I will not self-merge it; please merge when convenient. |
Summary
CROSS JOINin bothvector_top_kquery paths so SQLite keeps the virtual table beforememoriesWhy
Issue #247 shows SQLite can reorder the current inner join, drive from
memories, and evaluatevector_top_konce per matching row.CROSS JOINacts as the planner barrier proposed in the issue while keeping the join predicate and filters unchanged.Closes #247.
Verification
bun run typecheckbun run format:checkbun run buildbun test(408 pass,0 fail)