Files
SpacetimeDB/crates
joshua-spacetime 8287408ca2 Fix query optimization for semijoins (#4287)
# Description of Changes

Fixes a planner bug where certain join queries could fail with:
```
Could not compute positional arguments during query planning
```

The reason was that in the process of rewriting the query with
semijoins, the fallback branch of the optimization rule didn't track the
dependencies of the join correctly. In particular it didn't mark the LHS
table in the join condition as a dependency when recursing into the LHS
of the join tree. This led to the table being projected out or dropped
in the LHS subtree while still being referenced by the root of the
subtree.

This only happened for bridge tables (tables used to link or bridge
other tables in the join, but whose columns are not referenced in the
final output). If the table was referenced in the output, it would be
included in the list of dependencies from the start and so this bug
would not manifest.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

Added a sql execution test
2026-02-18 20:06:36 +00:00
..
2026-02-17 10:15:15 +00:00
2026-02-18 04:34:43 +00:00
2026-02-17 10:15:15 +00:00