Integrate virtual tables with optimizer

This change connects virtual tables with the query optimizer.
The optimizer now considers virtual tables during join order search
and invokes their best_index callbacks to determine feasible access
paths.

Currently, this is not a visible change, since none of the existing
extensions return information indicating that a plan is invalid.
This commit is contained in:
Piotr Rzysko
2025-08-03 09:50:02 +02:00
parent 521eb2368e
commit 82491ceb6a
10 changed files with 254 additions and 273 deletions

View File

@@ -320,6 +320,11 @@ def _test_series(limbo: TestTursoShell):
"SELECT * FROM generate_series WHERE start = 1 AND stop = 10;",
lambda res: res == "1\n2\n3\n4\n5\n6\n7\n8\n9\n10",
)
limbo.run_test_fn(
"SELECT * FROM generate_series WHERE 1 = start AND 10 = stop;",
lambda res: res == "1\n2\n3\n4\n5\n6\n7\n8\n9\n10",
"Constraint with column on RHS used as TVF arg"
)
limbo.run_test_fn(
"SELECT * FROM generate_series WHERE stop = 10 AND start = 1;",
lambda res: res == "1\n2\n3\n4\n5\n6\n7\n8\n9\n10",