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

Add multiset operators MULTISET UNION, IS A SET, FUSION, etc.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.17.0
    • Component/s: core
    • Labels:
      None

      Description

      While working on https://issues.apache.org/jira/browse/FLINK-4542 I realized that most of the multiset operations do not work and skipped in tests with

      if (TODO) 

      . So here I propose to fix it.
      Here it is my branch with fixes and tests
      Currently it is done for

      IS A SET
      IS NOT A SET
      IS EMPTY
      IS NOT EMPTY
      MEMBER OF
      MULTISET INTERSECT
      MULTISET INTERSECT ALL
      MULTISET UNION
      MULTISET UNION ALL
      MULTISET EXCEPT
      MULTISET EXCEPT ALL
      SUBMULTISET OF
      NOT SUBMULTISET OF
      

      may be the only one which is not done yet is FUSION

      by the way I have a question: is it ok that default case for MULTISET INTERSECT/UNION /EXCEPT is DISTINCT (here ) ? At the same time Oracle behaves in the opposite way (e.g. here https://docs.oracle.com/cd/B19306_01/server.102/b14200/operators006.htm)

      https://github.com/apache/calcite/compare/master...snuyanzin:CALCITE_MULTISETS
      I can make a PR if nobody minds

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              Sergey Nuyanzin Sergey Nuyanzin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: