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
Fixing broken test
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
  • Loading branch information
nickquinn408 authored and ntkathole committed Mar 10, 2026
commit f6ba8f901bbdbbf146b989b6152014a1f2a01b62
10 changes: 10 additions & 0 deletions sdk/python/feast/batch_feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ def __init__(
f"or CUSTOM_SOURCE, got {type(source).__name__}: {source.name} instead "
)

if (
source is None
and not udf
and not feature_transformation
and not aggregations
):
raise ValueError(
"BatchFeatureView requires at least one of: source, udf, feature_transformation, or aggregations."
)
Comment thread
nquinn408 marked this conversation as resolved.

self.mode = mode
self.udf = udf
self.udf_string = udf_string
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/unit/test_feature_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_create_batch_feature_view():
udf=lambda x: x,
)

with pytest.raises(TypeError):
with pytest.raises(ValueError):
BatchFeatureView(
name="test batch feature view", entities=[], ttl=timedelta(days=30)
)
Expand Down