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
[R] read_parquet(col_select =) silently returns the wrong columns when the file has nested (list) columns #55578
read_parquet(col_select = ...) returns incorrect columns, with no error or warning, that
come after a nested column with more than one leaf (e.g. list<struct<...>>). Appears to be an
indexing error introduced by the nested list column.
read_parquet() computes indices with tidyselect::eval_select() on as.data.frame(reader$GetSchema()), i.e. top-level field positions, and
passes them to reader$ReadTable(indices). ReadTable() appears to treat them as parquet leaf column indices.
Each nested column with more than one leaf shifts every later column, so
the result is off by one leaf per extra leaf.
In the reprex, field index 2 (b) maps to leaf 2 (nested.y), so nested is
returned.
Possible fix
translate the selected field indices to leaf
indices before calling ReadTable(), or read by field.
changed the title [-]`read_parquet(col_select =)` silently returns the wrong columns when the file has nested (list) columns[/-][+][R] `read_parquet(col_select =)` silently returns the wrong columns when the file has nested (list) columns[/+]on Nov 12, 2026
Activity
[-]`read_parquet(col_select =)` silently returns the wrong columns when the file has nested (list) columns[/-][+][R] `read_parquet(col_select =)` silently returns the wrong columns when the file has nested (list) columns[/+]thisisnic commentedon Nov 12, 2026
Thanks for the clear reproducible example, can confirm this is an Arrow bug that we should fix.
stufield commentedon Nov 12, 2026
FWIW, I've been using this workaround locally:
Tho, admittedly this is just a workaround ... sorry it took me a while to post an issue about it 🙏🏽
stufield commentedon Nov 12, 2026
Thanks for taking a look so quickly 👍🏽