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 2020/08/28 10:30:56 UTC
[GitHub] [incubator-doris] liutang123 opened a new issue #4481: Do not add exchange when table's distributioin satisfy the distribution requirements
liutang123 opened a new issue #4481:
URL: https://github.com/apache/incubator-doris/issues/4481
issue Reason
--
Now, Doris will create two fragments for aggretion.
Sometime, **Exchange for aggregation is unnecessary.**
Think about follow cases:
1. aggregate an unpartitioned table.
a. create table SQL:
```
CREATE TABLE `llj_test_1` (
`dt` int(11) NOT NULL COMMENT "",
`dis_key` varchar(20) NOT NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`dt`, `dis_key`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`dt`, `dis_key`) BUCKETS 3
PROPERTIES (
"replication_num" = "3",
"in_memory" = "false",
"storage_format" = "DEFAULT"
);
```
b. query SQL:`select dt, dis_key,count(1) from llj_test_1 group by dt, dis_key;`
2. aggregate a partitioned table:
a. create table SQL:
```
CREATE TABLE `llj_test` (
`dt` int(11) NOT NULL COMMENT "",
`dis_key` varchar(20) NOT NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`dt`, `dis_key`)
COMMENT "OLAP"
PARTITION BY RANGE(`dt`)
(PARTITION p20180822 VALUES [("19000101"), ("20181021")),
PARTITION p20181207 VALUES [("20181021"), ("20181022")))
DISTRIBUTED BY HASH(`dt`, `dis_key`) BUCKETS 3
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT"
);
```
b. query SQL:`select dt, dis_key,count(1) from llj_test group by dt, dis_key;`
Suggestion
--
In `DistributedPlanner`, do not add the unnecessary `Exchange`s.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-doris] liutang123 closed issue #4481: Do not add exchange when table's distributioin satisfy the distribution requirements
Posted by GitBox <gi...@apache.org>.
liutang123 closed issue #4481:
URL: https://github.com/apache/incubator-doris/issues/4481
----------------------------------------------------------------
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.
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