|
21 | 21 | import pytest |
22 | 22 |
|
23 | 23 | from feast import Entity, Field |
24 | | -from feast.aggregation import Aggregation, aggregation_specs_to_agg_ops |
| 24 | +from feast.aggregation import Aggregation |
25 | 25 | from feast.on_demand_feature_view import OnDemandFeatureView, on_demand_feature_view |
26 | 26 | from feast.types import Float64, Int64 |
27 | 27 | from feast.value_type import ValueType |
@@ -165,26 +165,3 @@ def dummy(df): |
165 | 165 | schema=[Field(name="out", dtype=Float64)], |
166 | 166 | udf=dummy, |
167 | 167 | ) |
168 | | - |
169 | | - |
170 | | -def test_aggregation_from_proto_no_time_window_roundtrip(): |
171 | | - """Aggregation.from_proto preserves None time_window (fixes timedelta(0) regression).""" |
172 | | - agg = Aggregation(column="amount", function="sum", name="total_amount") |
173 | | - assert agg.time_window is None |
174 | | - |
175 | | - restored = Aggregation.from_proto(agg.to_proto()) |
176 | | - assert restored.time_window is None |
177 | | - assert restored == agg |
178 | | - |
179 | | - |
180 | | -def test_aggregation_from_proto_no_time_window_online_serving(): |
181 | | - """Aggregations without time_window don't raise in aggregation_specs_to_agg_ops after roundtrip.""" |
182 | | - agg = Aggregation(column="amount", function="sum", name="total_amount") |
183 | | - restored = Aggregation.from_proto(agg.to_proto()) |
184 | | - |
185 | | - # Should not raise — time_window is None, not timedelta(0) |
186 | | - result = aggregation_specs_to_agg_ops( |
187 | | - [restored], |
188 | | - time_window_unsupported_error_message="Time window aggregation is not supported in online serving", |
189 | | - ) |
190 | | - assert result == {"total_amount": ("sum", "amount")} |
0 commit comments