[
https://issues.apache.org/jira/browse/BEAM-9954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199619#comment-17199619
]
Rui Wang commented on BEAM-9954:
--------------------------------
The primary challenge of this Jira is BeamSQL does not support scalar function
in non-select clauses (e.g. aggregation). For the example in the Jira
description, there is no way to compute `/` after SUM(a) and AVG(b) in
aggregation in BeamSQL. And in general, there is no way to compute func(agg1,
agg2).
> Beam ZetaSQL supports pure SQL user-defined aggregation functions
> -----------------------------------------------------------------
>
> Key: BEAM-9954
> URL: https://issues.apache.org/jira/browse/BEAM-9954
> Project: Beam
> Issue Type: Task
> Components: dsl-sql-zetasql
> Reporter: Rui Wang
> Priority: P3
>
> One naive example is
> {code:sql}
> CREATE AGGREGATE FUNCTION fun (a INT64, b INT64) AS (SUM(a)/AVG(b));
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)