Skip to content

Commit e40e3ba

Browse files
committed
fix: Add avg alias and fix aggregation group_by_keys
- Add "avg" -> "mean" function alias for aggregation - Fix group_by_keys retrieval in LocalFeatureBuilder to use column_info.join_keys
1 parent c559889 commit e40e3ba

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

sdk/python/feast/aggregation/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def resolved_name(self, time_window: Optional[timedelta] = None) -> str:
120120

121121
_FUNCTION_ALIASES: Dict[str, str] = {
122122
"count_distinct": "nunique",
123+
"avg": "mean",
123124
}
124125

125126

sdk/python/feast/infra/compute_engines/local/feature_builder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def build_aggregation_node(self, view, input_node):
6565
"Time window aggregation is not supported in the local compute engine."
6666
),
6767
)
68-
group_by_keys = view.entities
68+
column_info = self.get_column_info(view)
69+
group_by_keys = column_info.join_keys
6970
node = LocalAggregationNode(
7071
"agg", self.backend, group_by_keys, agg_ops, inputs=[input_node]
7172
)

0 commit comments

Comments
 (0)