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/07 07:12:47 UTC

[GitHub] [incubator-doris] HappenLee opened a new issue #4285: [Bug] Table join it's self should have same single partition to valid colocate join.

HappenLee opened a new issue #4285:
URL: https://github.com/apache/incubator-doris/issues/4285


   **Describe the bug**
   ```
   CREATE TABLE `tbl1` (
     `k1` date NOT NULL COMMENT "",
     `k2` int(11) NOT NULL COMMENT "",
     `v1` int(11) SUM NOT NULL COMMENT ""
   ) ENGINE=OLAP
   AGGREGATE KEY(`k1`, `k2`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`k1`)
   (PARTITION p1 VALUES [('0000-01-01'), ('2019-05-31')),
   PARTITION p2 VALUES [('2019-05-31'), ('2019-06-30')))
   DISTRIBUTED BY HASH(`k2`) BUCKETS 8
   PROPERTIES (
   "replication_num" = "1",
   "in_memory" = "false",
   "storage_format" = "DEFAULT"
   );
   ```
   
   There is a table `tbl1` have 2 partition.
   
   if we execute
   ```
   select b1.k1 from tbl1 b1, tbl1 b2 where b1.k2 = b2.k2;
   ```
   
   because there are two different partition, it should not  be colocate join.
   
   if we execute
   ```
   select b1.k1 from tbl1 b1, tbl1 b2 where b1.k2 = b2.k2 and b1.k1 = '2019-05-23' and b2.k1 = b1.k1;
   ```
   there is only one partition, it can be colocate join.
    
   


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