Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Implement the UNIQUE predicate, as specified by the SQL standard.
Example:
UNIQUE (SELECT publishedIn FROM Book WHERE authorId = 3) NOT UNIQUE (SELECT publishedIn FROM BOOK WHERE authorId = 3)
UNIQUE returns FALSE if the query returns two or more rows that do not include NULL values and are equal. Like EXISTS, it never returns UNKNOWN.
More details at JOOQ.
This Issue support the UNIQUE predicate by set isExpand to return false, so sub-queries are converted to RexSubQuery expressions and handled later by SubQueryRemoveRule.
Attachments
Issue Links
- is related to
-
CALCITE-4699 Support expand UNIQUE sub-queries into joins
- Open
- relates to
-
CALCITE-3524 Add methods to RelBuilder to create RexSubQuery
- Closed
- links to