From b8afaefa3a5ae0284985070286b38f2c01e35466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Wed, 11 Sep 2024 00:32:44 +0200 Subject: [PATCH] chore: fix selector construction by not requiring hashable arguments --- ibis/expr/types/relations.py | 2 +- ibis/selectors.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ibis/expr/types/relations.py b/ibis/expr/types/relations.py index a22871a74cfa1..50562d6f5a710 100644 --- a/ibis/expr/types/relations.py +++ b/ibis/expr/types/relations.py @@ -4268,7 +4268,7 @@ def pivot_wider( if isinstance(values_agg, str): values_agg = operator.methodcaller(values_agg) elif isinstance(values_agg, Deferred): - values_agg = lambda t: resolve(values_agg, _=t) + values_agg = lambda t, what=values_agg: resolve(what, _=t) if names is None: # no names provided, compute them from the data diff --git a/ibis/selectors.py b/ibis/selectors.py index ebb918c9badc6..a36e93181a93b 100644 --- a/ibis/selectors.py +++ b/ibis/selectors.py @@ -66,7 +66,6 @@ import ibis.expr.operations as ops import ibis.expr.types as ir from ibis import util -from ibis.common.collections import frozendict # noqa: TCH001 from ibis.common.selectors import All, Any, Expandable, Selector from ibis.common.typing import VarTuple # noqa: TCH001 @@ -424,7 +423,7 @@ class Across(Expandable): funcs: Union[ Builder, Callable[[ir.Value], ir.Value], - frozendict[Optional[str], Union[Builder, Callable[[ir.Value], ir.Value]]], + dict[Optional[str], Union[Builder, Callable[[ir.Value], ir.Value]]], ] names: Union[str, Callable[[str, Optional[str]], str]]