You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sergey Nuyanzin (JIRA)" <ji...@apache.org> on 2018/06/07 12:44:00 UTC

[jira] [Created] (CALCITE-2355) Multiset operations do not work as expected

Sergey Nuyanzin created CALCITE-2355:
----------------------------------------

             Summary: Multiset operations do not work as expected
                 Key: CALCITE-2355
                 URL: https://issues.apache.org/jira/browse/CALCITE-2355
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Sergey Nuyanzin
            Assignee: Julian Hyde


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 {code}if (TODO) {code}. So here I propose to fix it.
Here it is my branch with fixes and tests
Currently it is done for
{noformat}
IS A SET
IS NOT A SET
IS SUBMULTISET OF
IS NOT SUBMULTISET OF
IS EMPTY
IS NOT EMPTY
MULTISET INTERSECT
MULTISET INTERSECT ALL
MULTISET UNION
MULTISET UNION ALL
MULTISET EXCEPT
MULTISET EXCEPT ALL
{noformat}

may be the only one which is not done is FUSION
by the way I have a question: is it ok that default case for MULTISET INTERSECT/UNION /EXCEPT  is DISTINCT ([here|https://github.com/apache/calcite/blob/2179f8e87f4179e79e238da3c6c868c315c49e56/core/src/main/codegen/templates/Parser.jj#L5332] ) ? 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 do a PR if nobody minds 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)