Previously we were rewriting/traversing the AST in a couple different
places, each of these added kinda ad-hoc as we needed them. This
attempts to do the binding of column references as well as the rewriting
of anonymous `Expr::Variable` -> `__param_N` that we use to maintain the
order of bound variables, also normalizes the Qualified Name's.
Also we previously weren't accepting Variable (or at least they wouldn't
work) in places like `LIMIT ? OFFSET ?`, which this PR adds.
I kinda want to keep refactoring translation a bit, and try to break
plan building up into more easy-to-digest chunks.. but I will resist the
urge right now as it's definitely not high priority pre-beta
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#3210
I don't want to even think about the complexity involved in making sure
that materialized views are still sane after the base table(s) are
altered.
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes#3223
This PR introduces the final major operator: the JOIN operator.
Many things need to be fixed before we can properly support them, and we
handle those. In particular, JOINs always generate qualified column
statements, but we were not handling them correctly at all in the
operators. Not a problem for linear circuits, but fatal for JOINs.
The operator.rs file also becomes incredibly complex with not one, but
two stateful operator. So it is now broken apart.
Closes#3207
I keep getting these warnings and it slightly annoys me:
```rust
warning: unused variable: `overflow_cell_count_before`
--> core/storage/btree.rs:3634:29
|
3634 | let overflow_cell_count_before = parent_contents.overflow_cells.len();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_overflow_cell_count_before`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `overflow_cell_count_after`
--> core/storage/btree.rs:3641:29
|
3641 | let overflow_cell_count_after = parent_contents.overflow_cells.len();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_overflow_cell_count_after`
```
Reviewed-by: Nikita Sivukhin (@sivukhin)
Closes#3219