MCPcopy Index your code
hub / github.com/feast-dev/feast / aggregation_specs_to_agg_ops

Function aggregation_specs_to_agg_ops

sdk/python/feast/aggregation/__init__.py:126–138  ·  view source on GitHub ↗
(
    agg_specs: Iterable[Any],
    *,
    time_window_unsupported_error_message: str,
)

Source from the content-addressed store, hash-verified

124
125
126def aggregation_specs_to_agg_ops(
127 agg_specs: Iterable[Any],
128 *,
129 time_window_unsupported_error_message: str,
130) -> Dict[str, Tuple[str, str]]:
131 agg_ops: Dict[str, Tuple[str, str]] = {}
132 for agg in agg_specs:
133 if getattr(agg, "time_window", None) is not None:
134 raise ValueError(time_window_unsupported_error_message)
135 alias = getattr(agg, "name", None) or f"{agg.function}_{agg.column}"
136 func_name = _FUNCTION_ALIASES.get(agg.function, agg.function)
137 agg_ops[alias] = (func_name, agg.column)
138 return agg_ops
139
140
141__all__ = ["Aggregation", "aggregation_specs_to_agg_ops"]

Calls 1

getMethod · 0.80