Skip to content

Commit 4b98ea5

Browse files
committed
Fix
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
1 parent c1eba9b commit 4b98ea5

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

sdk/python/feast/stream_feature_view.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import copy
12
import functools
23
import warnings
34
from datetime import timedelta
45
from types import MethodType
5-
from typing import Dict, List, Optional, Union
6+
from typing import Dict, List, Optional, Type, Union
67

78
import dill
89
from google.protobuf.duration_pb2 import Duration
@@ -59,7 +60,6 @@ class StreamFeatureView(FeatureView):
5960
mode(optional): str. The mode of execution.
6061
timestamp_field (optional): Must be specified if aggregations are specified. Defines the timestamp column on which to aggregate windows.
6162
udf (optional): MethodType The user defined transformation function. This transformation function should have all of the corresponding imports imported within the function.
62-
6363
"""
6464

6565
def __init__(
@@ -270,6 +270,29 @@ def from_proto(cls, sfv_proto):
270270

271271
return sfv_feature_view
272272

273+
@property
274+
def proto_class(self) -> Type[StreamFeatureViewProto]:
275+
return StreamFeatureViewProto
276+
277+
def __copy__(self):
278+
fv = StreamFeatureView(
279+
name=self.name,
280+
schema=self.schema,
281+
entities=self.entities,
282+
ttl=self.ttl,
283+
tags=self.tags,
284+
online=self.online,
285+
description=self.description,
286+
owner=self.owner,
287+
aggregations=self.aggregations,
288+
mode=self.mode,
289+
timestamp_field=self.timestamp_field,
290+
sources=self.sources,
291+
udf=self.udf,
292+
)
293+
fv.projection = copy.copy(self.projection)
294+
return fv
295+
273296

274297
def stream_feature_view(
275298
*,

0 commit comments

Comments
 (0)