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
INTERNAL Error "Vector::Reference used on vector of different type (source VARCHAR[] referenced STRUCT(list VARCHAR))" in IcebergMultiFileReader::FinalizeChunk — list-encoding drift across files #1270
Table: AWS Security Lake native source CLOUD_TRAIL_MGMT v2.0 — Glue-managed Iceberg on S3,
data files written continuously by Security Lake over months (writer-version drift across files),
read via iceberg_scan('s3://…/metadata/<uuid>.metadata.json') (catalog-free mode)
Symptom
Projecting the whole table (SELECT *, to_json(t)) or the metadata struct column crashes:
INTERNAL Error: Vector::Reference used on vector of different type
(source VARCHAR[] referenced STRUCT(list VARCHAR))
The error's type pair (VARCHAR[] vs STRUCT("list" VARCHAR)) points at metadata.profiles:
older Security-Lake-written files evidently encode the list such that the reader surfaces it as a
single-field struct named list (parquet 3-level list wrapper surfaced literally), while newer
files/the table schema read as a proper VARCHAR[]. The multi-file remap path References the
child vector rather than converting between the two shapes.
Aggravator
The InternalExceptioninvalidates the whole DuckDB instance — every subsequent query on any
connection of that instance fails with FATAL Error: … database has been invalidated because of a previous fatal error. For long-lived embedded readers this turns one bad file into a full restart.
What still works (workarounds we use)
Explicit column lists excluding the affected struct — every other column reads fine, including
other nested structs and nested-field filters (for what it's worth, we could not reproduce [BUG] Scan filters broken for nested types #760's nested-filter-pushdown crash on this build).
Child projection works: SELECT metadata.uid, metadata.event_code … is fine — only
materializing the whole parent struct crashes.
Repro
We cannot share the table (security telemetry), but any Security Lake cloud_trail_mgmt 2.0 table
whose files span several months of SL writer versions should reproduce with SELECT * … LIMIT 1.
Synthetic shape: an Iceberg table with a list<string> field inside a struct, where data files
disagree on the parquet list element encoding/naming across commits; project the parent struct.
Happy to run diagnostics against our table on request.
Versions / environment
45163a28· httpfs827222f· awsefa54a9CLOUD_TRAIL_MGMTv2.0 — Glue-managed Iceberg on S3,data files written continuously by Security Lake over months (writer-version drift across files),
read via
iceberg_scan('s3://…/metadata/<uuid>.metadata.json')(catalog-free mode)Symptom
Projecting the whole table (
SELECT *,to_json(t)) or themetadatastruct column crashes:Stack (abridged):
The struct's current logical type (via
DESCRIBE):The error's type pair (
VARCHAR[]vsSTRUCT("list" VARCHAR)) points atmetadata.profiles:older Security-Lake-written files evidently encode the list such that the reader surfaces it as a
single-field struct named
list(parquet 3-level list wrapper surfaced literally), while newerfiles/the table schema read as a proper
VARCHAR[]. The multi-file remap pathReferences thechild vector rather than converting between the two shapes.
Aggravator
The
InternalExceptioninvalidates the whole DuckDB instance — every subsequent query on anyconnection of that instance fails with
FATAL Error: … database has been invalidated because of a previous fatal error. For long-lived embedded readers this turns one bad file into a full restart.What still works (workarounds we use)
other nested structs and nested-field filters (for what it's worth, we could not reproduce
[BUG] Scan filters broken for nested types #760's nested-filter-pushdown crash on this build).
SELECT metadata.uid, metadata.event_code …is fine — onlymaterializing the whole parent struct crashes.
Repro
We cannot share the table (security telemetry), but any Security Lake
cloud_trail_mgmt2.0 tablewhose files span several months of SL writer versions should reproduce with
SELECT * … LIMIT 1.Synthetic shape: an Iceberg table with a
list<string>field inside a struct, where data filesdisagree on the parquet list element encoding/naming across commits; project the parent struct.
Happy to run diagnostics against our table on request.