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/02/27 08:51:27 UTC
[GitHub] [incubator-doris] EmmyMiao87 opened a new issue #3011: The result
is double when new mv selector is enable
EmmyMiao87 opened a new issue #3011: The result is double when new mv selector is enable
URL: https://github.com/apache/incubator-doris/issues/3011
**Describe the bug**
The result data of query is double when new mv selector is enable.
**To Reproduce**
1. create a aggregate table
```
CREATE TABLE `test_deduplicate_agg` (
`k1` int(11) NULL COMMENT "",
`k2` int(11) NULL COMMENT "",
`v1` bigint(20) SUM NULL COMMENT "",
`v2` bigint(20) SUM NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(`k1`, `k2`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`k1`) BUCKETS 3
PROPERTIES (
"storage_type" = "COLUMN",
"replication_num" = "1",
"in_memory" = "false"
);
```
2. insert into values
insert into test_deduplicate_agg values (1,1,1,1);
insert into test_deduplicate_agg values (1,1,1,1);
3. create rollup which only has key columns
alter table test_deduplicate_agg add rollup only_key(k1, k2) properties ("replication_num"="1");
4. after rollup created
5. select k1 from test_deduplicate_agg;
+------+
| k1 |
+------+
| 1 |
+------+
1 row in set (0.01 sec)
mysql> explain select k1 from test_deduplicate_agg;
+----------------------------------------------------+
| Explain String |
+----------------------------------------------------+
| PLAN FRAGMENT 0 |
| OUTPUT EXPRS:`k1` |
| PARTITION: UNPARTITIONED |
| |
| RESULT SINK |
| |
| 1:EXCHANGE |
| tuple ids: 0 |
| |
| PLAN FRAGMENT 1 |
| OUTPUT EXPRS: |
| PARTITION: RANDOM |
| |
| STREAM DATA SINK |
| EXCHANGE ID: 01 |
| UNPARTITIONED |
| |
| 0:OlapScanNode |
| TABLE: test_deduplicate_agg |
| PREAGGREGATION: OFF. Reason: No AggregateInfo |
| partitions=1/1 |
| rollup: only_key |
| tabletRatio=3/3 |
| tabletList=15042,15044,15046 |
| cardinality=-1 |
| avgRowSize=0.0 |
| numNodes=0 |
| tuple ids: 0 |
+----------------------------------------------------+
28 rows in set (0.00 sec)
6. enable new mv selector
set use_new_mv_selector=true;
7.
mysql> select k1 from test_deduplicate_agg;
+------+
| k1 |
+------+
| 1 |
| 1 |
+------+
2 rows in set (0.05 sec)
8.
mysql> explain select k1 from test_deduplicate_agg;
+-----------------------------------------------------+
| Explain String |
+-----------------------------------------------------+
| PLAN FRAGMENT 0 |
| OUTPUT EXPRS:`k1` |
| PARTITION: UNPARTITIONED |
| |
| RESULT SINK |
| |
| 1:EXCHANGE |
| tuple ids: 0 |
| |
| PLAN FRAGMENT 1 |
| OUTPUT EXPRS: |
| PARTITION: RANDOM |
| |
| STREAM DATA SINK |
| EXCHANGE ID: 01 |
| UNPARTITIONED |
| |
| 0:OlapScanNode |
| TABLE: test_deduplicate_agg |
| PREAGGREGATION: ON |
| partitions=1/1 |
| rollup: only_key |
| tabletRatio=6/6 |
| tabletList=15042,15044,15046,15042,15044,15046 |
| cardinality=3 |
| avgRowSize=817.0 |
| numNodes=1 |
| tuple ids: 0 |
+-----------------------------------------------------+
28 rows in set (0.01 sec)
**Expected behavior**
the result of query should be same whatever no matter which selector is used.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] EmmyMiao87 closed issue #3011: The result is
double when new mv selector is enable
Posted by GitBox <gi...@apache.org>.
EmmyMiao87 closed issue #3011: The result is double when new mv selector is enable
URL: https://github.com/apache/incubator-doris/issues/3011
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org