You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/12/26 09:10:15 UTC

[GitHub] [incubator-doris] jackwener commented on issue #7478: [Bug] having 子句不支持 now(), current_date() 等常量函数

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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org