From b3757784b7e6bb2719a6a700297a7effb679aee5 Mon Sep 17 00:00:00 2001 From: pfackeldey Date: Tue, 3 Dec 2024 09:48:57 -0500 Subject: [PATCH] allow renaming when rebuilding --- src/dask_awkward/lib/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dask_awkward/lib/core.py b/src/dask_awkward/lib/core.py index d7c1a4e0..85ba7bf1 100644 --- a/src/dask_awkward/lib/core.py +++ b/src/dask_awkward/lib/core.py @@ -381,7 +381,7 @@ def __dask_postpersist__(self): def _rebuild(self, dsk, *, rename=None): name = self._name if rename: - raise ValueError("rename= unsupported in dask-awkward") + name = rename.get(name, name) return type(self)(dsk, name, self._meta, self.known_value) def __reduce__(self): @@ -962,7 +962,7 @@ def __setitem__(self, where: Any, what: Any) -> None: def _rebuild(self, dsk, *, rename=None): name = self.name if rename: - raise ValueError("rename= unsupported in dask-awkward") + name = rename.get(name, name) return Array(dsk, name, self._meta, divisions=self.divisions) def reset_meta(self) -> None: