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

Julian Hyde updated CALCITE-1845:
---------------------------------
    Labels: phoenix  (was: )

> Quantified comparison predicates (SOME, ANY, ALL)
> -------------------------------------------------
>
>                 Key: CALCITE-1845
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1845
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>              Labels: phoenix
>
> Support quantified comparison predicates (SOME, ANY, ALL), per the SQL 
> standard.
> {quote}
> <comp op> ::=
>     <equals operator>
>   \| <not equals operator>
>   \| <less than operator>
>   \| <greater than operator>
>   \| <less than or equals operator>
>   \| <greater than or equals operator>
> <quantifier> ::=
>     <all>
>   \| <some>
> <all> ::= ALL
> <some> ::=
>       SOME
>   \| ANY
> The result of “R <comp op> <quantifier> T” is derived by the application of 
> the implied <comparison predicate> “R <comp op> RT” to every row RT in T.
> Case:
> * a) If T is empty or if the implied <comparison predicate> is True for every 
> row RT in T, then “R <comp op> <all> T” is True.
> * b) If the implied <comparison predicate> is False for at least one row RT 
> in T, then “R <comp op> <all> T” is False.
> * c) If the implied <comparison predicate> is True for at least one row RT in 
> T, then “R <comp op> <some> T” is True.
> * d) If T is empty or if the implied <comparison predicate> is False for 
> every row RT in T, then “R <comp op> <some> T” is False.
> * e) If “R <comp op> <quantifier> T” is neither True nor False, then it is 
> Unknown.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to