[
https://issues.apache.org/jira/browse/IGNITE-28924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-28924:
-------------------------------------
Release Note: Added the ability to define a custom accumulator
implementation for an aggregate function used with DISTINCT.
> SQL Calcite: Add the ability to implement a custom DistinctAccumulator
> ----------------------------------------------------------------------
>
> Key: IGNITE-28924
> URL: https://issues.apache.org/jira/browse/IGNITE-28924
> Project: Ignite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-2
> Fix For: 2.19
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently, we can add our own
> *org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.Accumulator*
> via a
> {*}org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorFactoryProvider{*}.
> However, for *DISTINCT* operations, we cannot define a custom accumulator
> that independently tracks unique values.
> For example, if we were to implement an aggregate function like
> {*}AVG_WITH_KEEP(DISTINCT salary, 'FIRST') WITHIN GROUP (ORDER BY
> COALESCE(priority, 99) ASC, sale DESC){*}, we would need to get a unique
> value based on the group rather than the column; to achieve this, we would
> need to define our own {*}DistinctAccumulator{*}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)