Hi Chathura,

While the SINGLE_VALUE function could be used explicitly, usually this is a
result of a scalar subquery unnesting, and the goal of the function is to
ensure that the underlying operator returns no more than one row
(otherwise, this is not a scalar).

Regards,
Vladimir.

вт, 21 дек. 2021 г. в 13:52, Chathura Widanage <[email protected]>:

> Hi,
>
> Could you please explain the behaviour of SINGLE_VALUE aggregate with the
> equivalent SQL query?
>
> SqlSingleValueAggFunction (Apache Calcite calcite API)
> <
> https://calcite.apache.org/javadocAggregate/org/apache/calcite/sql/fun/SqlSingleValueAggFunction.html
> >
>
> It's not clear whether the "value" in the description refers to an entire
> table or a cell. Also, there are no samples publicly available for this
> aggregate function.
>
> Regards,
> Chathura
>

Reply via email to