Skip to content

Commit e703b40

Browse files
fix: Add __eq__, __hash__ to SparkSource for correct comparison (#4028)
* feat: Enable Arrow-based columnar data transfers Signed-off-by: tanlocnguyen <tanlocnguyen296@gmail.com> * fix: Add __eq__, __hash__ to SparkSource for comparision Signed-off-by: tanlocnguyen <tanlocnguyen296@gmail.com> * chore: simplify the logic Signed-off-by: tanlocnguyen <tanlocnguyen296@gmail.com> --------- Signed-off-by: tanlocnguyen <tanlocnguyen296@gmail.com> Co-authored-by: tanlocnguyen <tanlocnguyen296@gmail.com>
1 parent 9b98eaf commit e703b40

File tree

1 file changed

+13
-0
lines changed
  • sdk/python/feast/infra/offline_stores/contrib/spark_offline_store

1 file changed

+13
-0
lines changed

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ def get_table_query_string(self) -> str:
185185

186186
return f"`{tmp_table_name}`"
187187

188+
def __eq__(self, other):
189+
base_eq = super().__eq__(other)
190+
if not base_eq:
191+
return False
192+
return (
193+
self.table == other.table
194+
and self.query == other.query
195+
and self.path == other.path
196+
)
197+
198+
def __hash__(self):
199+
return super().__hash__()
200+
188201

189202
class SparkOptions:
190203
allowed_formats = [format.value for format in SparkSourceFormat]

0 commit comments

Comments
 (0)