jackwener commented on issue #7478:
URL:
https://github.com/apache/incubator-doris/issues/7478#issuecomment-1001135185
```sql
CREATE TABLE `having_test` (
`date_key` date NOT NULL DEFAULT "1970-01-01" COMMENT "日期键",
`year` int(11) NOT NULL DEFAULT "1970" COMMENT "年份",
`income` decimal(9, 2) NOT NULL DEFAULT '0.00' COMMENT "收入"
) ENGINE=OLAP
DUPLICATE KEY(`date_key`, `year`)
DISTRIBUTED BY HASH(`date_key`) BUCKETS 2
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2"
);
```
```sql
explain
SELECT year,SUM(income) income_sum
FROM having_test
GROUP BY year having sum(case when NOW() = '2021-12-24' then 0 else income
end) <> 0;
```
I successfully reproduce this Bug, it's certain a bug.
--
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]