nanoevents/methods/physlite needs to distinguish between dak.Array
and dak.Array._meta
#1075
Labels
bug
Something isn't working
dak.Array
and dak.Array._meta
#1075
This is following up from scikit-hep/awkward#3077.
In
coffea/src/coffea/nanoevents/methods/physlite.py
Lines 93 to 122 in 750b96d
load_column
can have typedask_awkward.Array
past the first if-guard if theevent_index
is not alsodask_awkward.Array
. Then some things are done with it that shouldn't be done with adask_awkward.Array
.The first is
ak.backend
, a top-level Awkward function that hasn't had a dask-awkward overload (until PR dask-contrib/dask-awkward#498) because it would always return the same thing,"typetracer"
. But useless functions for the sake of conformity are worthwhile, so I'm in favor of addingdak.backend
.The next is
ak.typetracer.touch_data
, which is not a high-level function—not the sort of thing that we should be overriding with dask-awkward. It's a public function so that libraries that depend on Awkward (like Coffea) can use them, but it's not intended for data analysts, and that's where dask-awkward's coverage of the Awkward interface should stop. To avoid a confusing downstream error message, I've added PR scikit-hep/awkward#3079 to make Awkward complain about passing adak.Array
intoak.typetracer.touch_data
, which means that the issue still has to be fixed.The Coffea code should detect whether
load_column
is adak.Array
, and if so, passload_column._meta
into these hidden-but-public Awkward functions. Where, exactly, you want to do that depends on the logic of this function; I'm not going to suggest a change. I noticed that on line 115, you're again assuming thatload_column
is not adak.Array
(which doesn't have alayout
), so someone knowledgeable about it, such as @nikoladze (the original author), should take a look.The text was updated successfully, but these errors were encountered: