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
{{ message }}
Repository navigation
Commit 6689e8f
Browse filesBrowse the repository at this point in the historyBrowse files
DuckDB can ask a table function for a struct field instead of the whole column
(`ColumnIndex::IsPushdownExtract()`), which is what lets `SELECT s.a.b` avoid
reading `s`. Answer the callback for struct columns -- but not when the scan has
aggregates bound, since the aggregate pushdown binds column indexes itself and
cannot express an extracted path -- and swap `statistics` for
`statistics_extended`, which is what makes DuckDB consult that callback at all.
The extended callback returns no statistics for an extracted path, as Vortex has
no nested statistics.
`InitializeGlobalState` now passes the flattened child paths, their offsets and
the type DuckDB expects each one to be emitted as, and `Projection::new` turns a
path into a chain of `get_item`s with a cast when the requested type differs from
the field's own. The packed output names include the path, because DuckDB binds
one output column per extracted path.
`test_vortex_scan_struct_extract_projection` is ignored: DuckDB's
`MultiFileColumnMapper` still rebuilds the struct for a `PUSHDOWN_EXTRACT`
column, so `MultiFileReader::FinalizeChunk` executes a struct expression against
a vector typed as the extracted field and raises an internal error. Supporting
this for a MultiFileReader-based scan needs a DuckDB-side patch.
Part of #10297
Signed-off-by: Paolo Valletta <paovalletta@hotmail.it>
0 commit comments