You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/10/16 01:29:00 UTC

[jira] [Resolved] (CALCITE-2935) Add BOOL_OR, BOOL_AND, LOGICAL_OR, LOGICAL_AND aggregate functions

     [ https://issues.apache.org/jira/browse/CALCITE-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-2935.
----------------------------------
    Fix Version/s: 1.27.0
       Resolution: Fixed

Fixed in [52eaa919|https://github.com/julianhyde/calcite/commit/52eaa919cea56e3fcce492d7a309f704258e6b5d].

> Add BOOL_OR, BOOL_AND, LOGICAL_OR, LOGICAL_AND aggregate functions
> ------------------------------------------------------------------
>
>                 Key: CALCITE-2935
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2935
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: Haisheng Yuan
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.27.0
>
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Support ANY, SOME, EVERY (also known as BOOL_OR, BOOL_AND) aggregate functions.
> ANY, SOME is equivalent with bool_or. EVERY is equivalent with bool_and. Parser needs to be changed to support these aggregate functions.
> [https://blog.jooq.org/2014/12/18/a-true-sql-gem-you-didnt-know-yet-the-every-aggregate-function/]
>  [https://mysqlserverteam.com/using-the-aggregate-functions-any-some-every-with-mysql/]
> Note that if ANY or SOME aggregate function is placed on the right side of comparison operation and argument of this function is a subquery additional parentheses around aggregate function are required, otherwise it will be parsed as quantified comparison predicate.
> Example:
> ANY(NAME LIKE 'W%')
>  A = (ANY((SELECT B FROM T)))



--
This message was sent by Atlassian Jira
(v8.3.4#803005)