diff --git a/dask_expr/_core.py b/dask_expr/_core.py index 301c26ab..0f80da1b 100644 --- a/dask_expr/_core.py +++ b/dask_expr/_core.py @@ -442,11 +442,13 @@ def lower_completely(self) -> Expr: def _lower(self): return + @functools.cached_property + def _funcname(self): + return funcname(type(self)).lower() + @functools.cached_property def _name(self): - return ( - funcname(type(self)).lower() + "-" + _tokenize_deterministic(*self.operands) - ) + return self._funcname + "-" + _tokenize_deterministic(*self.operands) @property def _meta(self): diff --git a/dask_expr/io/io.py b/dask_expr/io/io.py index ffff71a8..918fab53 100644 --- a/dask_expr/io/io.py +++ b/dask_expr/io/io.py @@ -103,7 +103,7 @@ class FusedIO(BlockwiseIO): @functools.cached_property def _name(self): return ( - funcname(type(self.operand("_expr"))).lower() + self.operand("_expr")._funcname + "-fused-" + _tokenize_deterministic(*self.operands) ) diff --git a/dask_expr/io/parquet.py b/dask_expr/io/parquet.py index 814d54fb..a53eac71 100644 --- a/dask_expr/io/parquet.py +++ b/dask_expr/io/parquet.py @@ -631,12 +631,18 @@ def columns(self): else: return _convert_to_list(columns_operand) + @cached_property + def _funcname(self): + return "read_parquet" + @cached_property def _name(self): return ( - funcname(type(self)).lower() + self._funcname + "-" - + _tokenize_deterministic(self.checksum, *self.operands[:-1]) + + _tokenize_deterministic( + funcname(type(self)), self.checksum, *self.operands[:-1] + ) ) @property