Skip to content

Commit 1be3e95

Browse files
committed
fix tests
1 parent ac2e712 commit 1be3e95

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/snowflake/snowpark/modin/plugin/_internal/snowpark_pandas_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import datetime
66
import inspect
77
from abc import ABCMeta, abstractmethod
8-
from dataclasses import dataclass
8+
from dataclasses import dataclass, field
99
from typing import Any, Callable, NamedTuple, Optional, Tuple, Type, Union
1010

1111
import numpy as np
@@ -121,7 +121,7 @@ class TimedeltaType(SnowparkPandasType, LongType):
121121
two times.
122122
"""
123123

124-
snowpark_type: DataType = LongType()
124+
snowpark_type: DataType = field(default_factory=LongType)
125125
pandas_type: np.dtype = np.dtype("timedelta64[ns]")
126126
types_to_convert_with_from_pandas: Tuple[Type] = ( # type: ignore[assignment]
127127
native_pd.Timedelta,

src/snowflake/snowpark/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ def filtered(d: dict) -> dict:
181181
self.__dict__
182182
) == filtered(other.__dict__)
183183

184+
def __hash__(self):
185+
return hash(repr(self))
186+
184187

185188
class TimestampTimeZone(Enum):
186189
"""

0 commit comments

Comments
 (0)