xiong duan created CALCITE-7074:
-----------------------------------
Summary: 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
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)