Introduce Register struct

OwnedValue has become a powerhouse of madness, mainly because I decided
to do it like that when I first introduced AggContext. I decided it was
enough and I introduced a `Register` struct that contains `OwnedValue`,
`Record` and `Aggregation`, this way we don't use `OwnedValue` for
everything make everyone's life harder.

This is the next step towards making ImmutableRecords the default
because I want to remove unnecessary allocations. Right now we clone
OwnedValues when we generate a record more than needed.
This commit is contained in:
Pere Diaz Bou
2025-03-26 14:52:35 +01:00
parent af6e9cd2c2
commit 9291f60722
18 changed files with 867 additions and 713 deletions

View File

@@ -333,7 +333,6 @@ fn row_to_py(py: Python, row: &limbo_core::Row) -> Result<PyObject> {
limbo_core::OwnedValue::Blob(b) => {
py_values.push(PyBytes::new(py, b.as_slice()).into())
}
_ => unreachable!(),
}
}
Ok(PyTuple::new(py, &py_values)