stdpain opened a new issue #6378:
URL: https://github.com/apache/incubator-doris/issues/6378
**Describe the bug**
Table
```
create table a_table (`products_id` bigint NULL)
ENGINE=OLAP
DUPLICATE KEY(`products_id`)
DISTRIBUTED BY HASH(`products_id`) BUCKETS 6
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);
create table b_table (`products_id` bigint NULL)
ENGINE=OLAP
DUPLICATE KEY(`products_id`)
DISTRIBUTED BY HASH(`products_id`) BUCKETS 6
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);
```
SQL:
```
SELECT count( distinct products_id) FROM a_table as a WHERE 1=1 AND
products_id in ( SELECT products_id from b_table );
```
Result:
```
mysql> select count(*) from a_table where products_id in (select products_id
from b_table);
+----------+
| count(*) |
+----------+
| 10000 |
+----------+
1 row in set (0.40 sec)
mysql> select count(*) from a_table where products_id in (select products_id
from b_table);
+----------+
| count(*) |
+----------+
| 9999 |
+----------+
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]