Skip to content

Commit

Permalink
Add TableProxy.__hash__
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins committed May 21, 2024
1 parent 9c68ac3 commit fbdcf32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daskms/table_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def __call__(cls, *args, **kwargs):
return _table_cache[key]
except KeyError:
instance = type.__call__(cls, *args, **kwargs)
instance._hashvalue = key
_table_cache[key] = instance
return instance

Expand Down Expand Up @@ -363,6 +364,9 @@ def __init__(self, factory, *args, **kwargs):
def executor_key(self):
return self._ex_key

def __hash__(self):
return self._hashvalue

def __reduce__(self):
"""Defer to _map_create_proxy to support kwarg pickling"""
return (
Expand Down

0 comments on commit fbdcf32

Please sign in to comment.