[
https://issues.apache.org/jira/browse/CALCITE-7074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986437#comment-17986437
]
Mihai Budiu commented on CALCITE-7074:
--------------------------------------
It looks to me that the issue title is a buggy test case, but the bug is
actually more general - at least the fix has nothing to do with VALUES.
Can you refine the description of the issue or perhaps even the issue title,
and what the fix actually does?
> IN-list that includes NULL converted to Values return wrong result
> ------------------------------------------------------------------
>
> Key: CALCITE-7074
> URL: https://issues.apache.org/jira/browse/CALCITE-7074
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Assignee: xiong duan
> Priority: Major
>
> In Sub-query.iq:
> {code:java}
> select * from "scott".emp where (empno, deptno) not in ((1, 2), (3, null));
> +-------+-------+-----+-----+----------+-----+------+--------+
> | EMPNO | ENAME | JOB | MGR | HIREDATE | SAL | COMM | DEPTNO |
> +-------+-------+-----+-----+----------+-----+------+--------+
> +-------+-------+-----+-----+----------+-----+------+--------+
> (0 rows)
> !ok {code}
> should return all values.
> This is because In SubQueryRemoveRule :
> {code:java}
> builder.aggregate(builder.groupKey(),
> builder.count(false, "c"),
> builder.count(builder.fields()).as("ck"));{code}
> When builder.fields contains multiple columns, builder.count() cannot convey
> the intended meaning. Currently, only one of the columns has been retrieved.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)