[
https://issues.apache.org/jira/browse/CALCITE-7429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhen Chen reassigned CALCITE-7429:
----------------------------------
Assignee: Zhen Chen
> Query with MINUS fails with "Unable to implement EnumerableMinus(all=[false])"
> ------------------------------------------------------------------------------
>
> Key: CALCITE-7429
> URL: https://issues.apache.org/jira/browse/CALCITE-7429
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Zhen Chen
> Priority: Major
> Labels: pull-request-available
>
> Query with MINUS fails with "Unable to implement
> EnumerableMinus(all=[false])". The query and error are as follows.
> {noformat}
> SELECT deptno FROM emp WHERE deptno > 12
> EXCEPT
> SELECT deptno FROM dept WHERE deptno = 5
> EXCEPT
> SELECT deptno FROM emp e1 WHERE EXISTS (
> SELECT 1 FROM emp e2
> WHERE e2.comm = e1.comm)
> EXCEPT
> SELECT deptno FROM dept WHERE deptno = 10
> EXCEPT
> SELECT deptno FROM emp WHERE deptno > 20;
> !ok {noformat}
> throws
> {noformat}
> java.sql.SQLException: Error while executing SQL "SELECT deptno FROM emp
> WHERE deptno > 12
> ...
> SELECT deptno FROM emp WHERE deptno > 20": Unable to implement
> EnumerableMinus(all=[false]): rowcount = 1.0, cumulative cost =
> {119.56146802614614 rows, 955.4 cpu, 0.0 io}, id = 321233
> at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
> ...
> Caused by: java.lang.IllegalStateException: Unable to implement
> EnumerableMinus{noformat}
> This bug was discovered while trying to enable
> testMinusToFilterNWayWithSubquery as part of CALCITE-7420. The query is not
> necessarily minimal.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)