You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(duckdb): push down list length expressions (#8544)
Pushes DuckDB's list-length scalar function into the Vortex scan as the
`list_length` expression, so lengths are computed from list
offsets/sizes without materializing element values.
Pushdowns supported:
- **Projection** (`SELECT len(list)` / `length(list)` /
`array_length(list)`)
- **Filter** (`WHERE array_length(list) >= k`, also `len`/`length`)
Each maps to `cast(list_length(col), i64)` — DuckDB's
`len`/`array_length` return `BIGINT` while `list_length` returns `u64`.
`len`/`length` are overloaded with strings/bits, so the filter path
needs the argument type to disambiguate. Added a small FFI accessor
`duckdb_vx_expr_get_return_type` plus `ExpressionRef::return_type()`,
and gate `len`/`length`/`array_length` on the bound child being
`LIST`/`ARRAY`.
Does not currently support `array_length(expr, dim)`.
Stacked on #8495.
---------
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
0 commit comments