In some cases, we want to write UDOs that are valid for different data structures. That is generally possible, but if we cannot pass as argument a dynamic number of components, the functionality is limited in cases of aggregations.
For instance:
define operator moving_agerage (DS dataset, part_comp component, order_comp component, number_periods integer)
returns dataset is
avg(
DS
over(
partition by part_comp
order by order_comp asc
data points between number_periods preceding and current data point
)
)
end operator;
This operator is only valid for partitions with one component. If we wanted partitions by two components, we would need to write a new UDO.
Proposed Solution
We would like to be able to write the UDO like this:
define operator moving_agerage (DS dataset, part_comps component_set, order_comp component, number_periods integer)
returns dataset is
avg(
DS
over(
partition by part_comps
order by order_comp asc
data points between number_periods preceding and current data point
)
)
end operator;
Issue Description
In some cases, we want to write UDOs that are valid for different data structures. That is generally possible, but if we cannot pass as argument a dynamic number of components, the functionality is limited in cases of aggregations. For instance:
This operator is only valid for partitions with one component. If we wanted partitions by two components, we would need to write a new UDO.
Proposed Solution
We would like to be able to write the UDO like this: