Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selecting columns from Parquet. #1486

Merged
merged 1 commit into from
Jun 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/awkward/_v2/operations/ak_from_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _metadata(

if columns is not None:
list_indicator = "list.item"
for column_metadata in file_for_metadata.schema:
for column_metadata in parquetfile_for_metadata.schema:
if (
column_metadata.max_repetition_level > 0
and ".list.element." in column_metadata.path
Expand All @@ -138,6 +138,8 @@ def _metadata(
)
subform = form.select_columns(columns)
parquet_columns = subform.columns(list_indicator=list_indicator)
if parquetfile_for_metadata.schema_arrow.names == [""]:
parquet_columns = ["." + x for x in parquet_columns]

metadata = parquetfile_for_metadata.metadata
if row_groups is not None:
Expand Down