Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cr
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Apr 4, 2022
commit c2dbd7b6e89e3b46ae86ec474ef53444f18b7739
10 changes: 4 additions & 6 deletions sdk/python/feast/infra/offline_stores/bigquery_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@


class BigQuerySource(DataSource):
# Note: Python requires redefining hash in child classes that override __eq__
def __hash__(self):
return super().__hash__()

def __init__(
self,
event_timestamp_column: Optional[str] = "",
Expand Down Expand Up @@ -99,6 +95,10 @@ def __init__(
owner=owner,
)

# Note: Python requires redefining hash in child classes that override __eq__
def __hash__(self):
return super().__hash__()

def __eq__(self, other):
if not isinstance(other, BigQuerySource):
raise TypeError(
Expand Down Expand Up @@ -136,7 +136,6 @@ def from_proto(data_source: DataSourceProto):
table_ref=data_source.bigquery_options.table_ref,
event_timestamp_column=data_source.event_timestamp_column,
created_timestamp_column=data_source.created_timestamp_column,
date_partition_column=data_source.date_partition_column,
query=data_source.bigquery_options.query,
description=data_source.description,
tags=dict(data_source.tags),
Expand All @@ -156,7 +155,6 @@ def to_proto(self) -> DataSourceProto:

data_source_proto.event_timestamp_column = self.event_timestamp_column
data_source_proto.created_timestamp_column = self.created_timestamp_column
data_source_proto.date_partition_column = self.date_partition_column

return data_source_proto

Expand Down