Closed ikrommyd closed 2 months ago
OK, will fix. Actually, an empty partition should result in no file at all. That does raise the question of what to do when all partitions are empty, but I'll defer that one.
Actually, this is an ak error:
import awkward as ak
array = ak.Array({"x": [], "y":[]})
ak.to_parquet(array, "dummy", extensionarray=False) # works fine
ak.to_parquet(array, "dummy", extensionarray=True) # fails
cc @jpivarski
Of course, dak could still simply skip empty partitions.
Ah, I'm sorry then. I thought it would be tested on awkward
and I saw only extensionarray=False
in the dask-awkward
codebase so I assume it was a dak
problem.
This is a problem in my case because I'm skimming and writing NTuples, and some partitions end up with zero events after skimming so it tries to write empty arrays and the entire dask computation is being killed.
I expect this to be fixed by scikit-hep/awkward#3234.
+1 , please close this when that one is merged.
I am still unsure on whether dak should omit these files entirely, since then you can end up with no output at all.
To reproduce
Traceback