Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
updated tests and registry diff function
Signed-off-by: Francisco Javier Arceo <franciscojavierarceo@users.noreply.github.com>
  • Loading branch information
franciscojavierarceo committed Mar 18, 2024
commit 326ca4a27832ddd0beb60b224da12b9ccb50f130
2 changes: 1 addition & 1 deletion sdk/python/feast/diff/registry_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def diff_registry_objects(
if _field.name in FIELDS_TO_IGNORE:
continue
elif getattr(current_spec, _field.name) != getattr(new_spec, _field.name):
if _field.name == "user_defined_function":
if _field.name == "transformation":
current_spec = cast(OnDemandFeatureViewSpec, current_spec)
new_spec = cast(OnDemandFeatureViewSpec, new_spec)
current_udf = current_spec.transformation.user_defined_function
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/on_demand_feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ def from_proto(cls, on_demand_feature_view_proto: OnDemandFeatureViewProto):
)

if (
on_demand_feature_view_proto.spec.WhichOneof("transformation")
on_demand_feature_view_proto.spec.transformation.WhichOneof("transformation")
== "user_defined_function"
):
transformation = OnDemandPandasTransformation.from_proto(
on_demand_feature_view_proto.spec.transformation.user_defined_function
)
elif (
on_demand_feature_view_proto.spec.WhichOneof("transformation")
on_demand_feature_view_proto.spec.transformation.WhichOneof("transformation")
== "on_demand_substrait_transformation"
):
transformation = OnDemandSubstraitTransformation.from_proto(
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/tests/unit/diff/test_registry_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ def post_changed(inputs: pd.DataFrame) -> pd.DataFrame:
assert feast_object_diffs.feast_object_property_diffs[0].property_name == "name"
assert (
feast_object_diffs.feast_object_property_diffs[1].property_name
== "user_defined_function.name"
== "transformation.name"
)
assert (
feast_object_diffs.feast_object_property_diffs[2].property_name
== "user_defined_function.body_text"
== "transformation.body_text"
)


Expand Down