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


   **Describe the bug**
   There is a table
   ```
    CREATE TABLE `colo` (
     `k1` tinyint(4) NULL COMMENT "",
     `k2` smallint(6) NULL COMMENT "",
     `k3` int(11) NULL COMMENT "",
     `k4` bigint(20) SUM NULL COMMENT ""
   ) ENGINE=OLAP
   AGGREGATE KEY(`k1`, `k2`, `k3`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`k1`, `k2`, `k3`) BUCKETS 5
   PROPERTIES (
   "replication_num" = "1",
   "in_memory" = "false",
   "storage_format" = "DEFAULT"
   ); 
   ```
   
   ```select b1.k1 from colo b1, colo b2 where b1.k1 = b2.k2 and b1.k2 = b2.k1 
and b2.k3 = b1.k3;``` 
   should not be colocate join, because the eqjoinConjuncts column do not have 
the same order like colocate distribute column.
   
   The corret SQL should be
   ```select b1.k1 from colo b1, colo b2 where b1.k2 = b2.k2 and b1.k1 = b2.k1 
and b2.k3 = b1.k3;``` 
   
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to