GoGoWen opened a new issue #7549: URL: https://github.com/apache/incubator-doris/issues/7549
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version 0.15 ### What's Wrong? table: CREATE TABLE `test` ( `date_time` datetime NOT NULL COMMENT "", `plan_id` bigint(20) NULL COMMENT "", `talent_id` varchar(40) NULL COMMENT "", `order_id` bigint(20) NULL COMMENT "", `id` bigint(20) NULL COMMENT "", `li_order_line` bigint(20) SUM NULL COMMENT "", `yg_cos_price` bigint(20) SUM NULL COMMENT "", `yg_cos_fee` bigint(20) SUM NULL COMMENT "", `fi_order_line` bigint(20) SUM NULL COMMENT "", `cos_price` bigint(20) SUM NULL COMMENT "", `cos_fee` bigint(20) SUM NULL COMMENT "" ) ENGINE=OLAP AGGREGATE KEY(`date_time`, `plan_id`, `talent_id`, `order_id`, `id`) COMMENT "OLAP" PARTITION BY RANGE(`date_time`) (PARTITION p202110 VALUES [('0000-01-01 00:00:00'), ('2021-11-01 00:00:00')), PARTITION p202111 VALUES [('2021-11-01 00:00:00'), ('2021-12-01 00:00:00')), PARTITION p202112 VALUES [('2021-12-01 00:00:00'), ('2022-01-01 00:00:00')), PARTITION p202201 VALUES [('2022-01-01 00:00:00'), ('2022-02-01 00:00:00'))) DISTRIBUTED BY HASH(`plan_id`) BUCKETS 16 PROPERTIES ( "replication_num" = "3", "in_memory" = "false", "storage_format" = "V2" ); when doing query like below: select sum(li_order_line) from bw_5 where plan_id=28733373421; the result is: +----------------------+ | sum(`li_order_line`) | +----------------------+ | NULL | +----------------------+ 1 row in set (0.12 sec) ### What You Expected? Empty set ### How to Reproduce? table: CREATE TABLE `test` ( `date_time` datetime NOT NULL COMMENT "", `plan_id` bigint(20) NULL COMMENT "", `talent_id` varchar(40) NULL COMMENT "", `order_id` bigint(20) NULL COMMENT "", `id` bigint(20) NULL COMMENT "", `li_order_line` bigint(20) SUM NULL COMMENT "", `yg_cos_price` bigint(20) SUM NULL COMMENT "", `yg_cos_fee` bigint(20) SUM NULL COMMENT "", `fi_order_line` bigint(20) SUM NULL COMMENT "", `cos_price` bigint(20) SUM NULL COMMENT "", `cos_fee` bigint(20) SUM NULL COMMENT "" ) ENGINE=OLAP AGGREGATE KEY(`date_time`, `plan_id`, `talent_id`, `order_id`, `id`) COMMENT "OLAP" PARTITION BY RANGE(`date_time`) (PARTITION p202110 VALUES [('0000-01-01 00:00:00'), ('2021-11-01 00:00:00')), PARTITION p202111 VALUES [('2021-11-01 00:00:00'), ('2021-12-01 00:00:00')), PARTITION p202112 VALUES [('2021-12-01 00:00:00'), ('2022-01-01 00:00:00')), PARTITION p202201 VALUES [('2022-01-01 00:00:00'), ('2022-02-01 00:00:00'))) DISTRIBUTED BY HASH(`plan_id`) BUCKETS 16 PROPERTIES ( "replication_num" = "3", "in_memory" = "false", "storage_format" = "V2" ); when doing query like below: select sum(li_order_line) from bw_5 where plan_id=28733373421; the result is: +----------------------+ | sum(`li_order_line`) | +----------------------+ | NULL | +----------------------+ 1 row in set (0.12 sec) ### Anything Else? nop ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org