Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4486

UNIQUE predicate

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              nobigo xiong duan
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m