Skip to content

Commit

Permalink
make unproject_layout do nothing; check report for shape_touched.
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis committed Jul 12, 2023
1 parent 0632b07 commit 97c8595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/dask_awkward/lib/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def _necessary_columns(dsk: HighLevelGraph) -> dict[str, list[str]]:
"""Pair layer names with lists of necessary columns."""
kv = {}
for name, report in _get_column_reports(dsk).items():
cols = {_ for _ in report.data_touched if _ is not None}
cols = {_ for _ in report.data_touched + report.shape_touched if _ is not None}
select = []
for col in sorted(cols):
if col == name:
Expand Down
7 changes: 4 additions & 3 deletions src/dask_awkward/lib/unproject_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ def unproject_layout(form: Form | None, layout: Content) -> Content:
not appear in the projected layout will be PlaceholderArrays).
"""
if form is None:
return layout
return _unproject_layout(form, layout, layout.length, layout.backend)
return layout
# if form is None:
# return layout
# return _unproject_layout(form, layout, layout.length, layout.backend)

0 comments on commit 97c8595

Please sign in to comment.