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/28 07:43:31 UTC

[GitHub] [incubator-doris] EmmyMiao87 opened a new issue #3016: The pre aggregation is ON in new selector when result of query only has key columns

EmmyMiao87 opened a new issue #3016: The pre aggregation is ON in new selector when result of query only has key columns
URL: https://github.com/apache/incubator-doris/issues/3016
 
 
   **Describe the bug**
   The pre aggregation is difference between old and new selector when result of query only has key columns.
   The query is select k1  from aggregate_table;
   
   The pre aggregation is ON in this query.
   
   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=3/3              |
   |      tabletList=15042,15044,15046 |
   |      cardinality=0                |
   |      avgRowSize=0.0               |
   |      numNodes=0                   |
   |      tuple ids: 0                 |
   +-----------------------------------+
   28 rows in set (0.08 sec)
   
   While the correct answer is OFF.
   
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create 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. query 
   
   `select k1 from test_deduplicate_agg;`
   
   3. explain query on new selector 
   
   ```
   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=3/3              |
   |      tabletList=15042,15044,15046 |
   |      cardinality=0                |
   |      avgRowSize=0.0               |
   |      numNodes=0                   |
   |      tuple ids: 0                 |
   +-----------------------------------+
   28 rows in set (0.08 sec)
   ```
   
   **Expected behavior**
   The correct pre aggregation value is OFF
   
   ```
   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=2                                 |
   |      avgRowSize=408.5                              |
   |      numNodes=1                                    |
   |      tuple ids: 0                                  |
   +----------------------------------------------------+
   28 rows in set (0.02 sec)
   ```
   
   
   

----------------------------------------------------------------
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 #3016: The pre aggregation is ON in new selector when result of query only has key columns

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 closed issue #3016: The pre aggregation is ON in new selector when result of query only has key columns
URL: https://github.com/apache/incubator-doris/issues/3016
 
 
   

----------------------------------------------------------------
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