You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Xurenhe (Jira)" <ji...@apache.org> on 2021/09/18 15:06:00 UTC
[jira] [Comment Edited] (CALCITE-4763) add EXISTS_AGG aggregate
function
[ https://issues.apache.org/jira/browse/CALCITE-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417159#comment-17417159 ]
Xurenhe edited comment on CALCITE-4763 at 9/18/21, 3:05 PM:
------------------------------------------------------------
Hi, [~nobigo]
I am interested in the semantics of this aggregate function.
Is `EXISTS_AGG(COLUMN)` equal to `EXISTS_AGG(DISTINCT COLUMN)`?
was (Author: wojustme):
Hi, I am interested in the semantics of this aggregate function.
Is `EXISTS_AGG(COLUMN)` equal to `EXISTS_AGG(DISTINCT COLUMN)`?
> add EXISTS_AGG aggregate function
> ---------------------------------
>
> Key: CALCITE-4763
> URL: https://issues.apache.org/jira/browse/CALCITE-4763
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: duan xiong
> Priority: Major
>
> Add {{EXISTS_AGG}}, an aggregate function that returns whether count is greater than zero.
> Thus {{EXISTS_AGG(*)}} is equivalent to {{COUNT(*) > 0}}, and {{EXISTS_AGG(c)}} is equivalent to {{COUNT(c) > 0}}.
> {{EXISTS_AGG}} would mainly be of use internally. Since it produces a {{BOOLEAN}} value, we can use the value directly from an {{Aggregate}} without an intervening {{Project}}. It also captures the fact that we don't care how many rows were produced.
> See also {{TRUE_AGG}}, CALCITE-4334.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)