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

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

    [ https://issues.apache.org/jira/browse/CALCITE-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505076#comment-16505076 ] 

Julian Hyde commented on CALCITE-2355:
--------------------------------------

bq. 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 

I checked the SQL standard and it agrees with Oracle:

bq. If DISTINCT is specified, then let SQ be DISTINCT. Otherwise, let SQ be ALL.

Can you please fix the parser?

I reviewed your change. It looks OK, but please make the line indentations consistent with our standard. Also please create a PR.

> 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
>            Priority: Major
>
> 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 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
> {noformat}
> 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|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 make a PR if nobody minds 



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