kangkaisen commented on issue #1289: Modify colocation creation logic URL: https://github.com/apache/incubator-doris/pull/1289#issuecomment-504723709 After I tested in my test env, I found two minor issue: 1 This PR don't support cascade colocate join. for example: ``` CREATE TABLE `t1` ( `dt` int(11), `id` int(11), `value` varchar(8) ) DUPLICATE KEY(dt, id) PARTITION BY RANGE (dt) ( PARTITION p1 VALUES LESS THAN ("08"), PARTITION p2 VALUES LESS THAN ("09"), PARTITION p3 VALUES LESS THAN ("10") ) DISTRIBUTED BY HASH(`id`) BUCKETS 10 PROPERTIES ( "replication_num" = "2", "colocate_with" = "t1" ); CREATE TABLE `t2` ( `dt` int(11), `id` int(11), `value` varchar(8) ) DUPLICATE KEY(dt, id) PARTITION BY RANGE (dt) ( PARTITION p1 VALUES LESS THAN ("10") ) DISTRIBUTED BY HASH(`id`) BUCKETS 10 PROPERTIES ( "replication_num" = "2", "colocate_with" = "t1" ); CREATE TABLE `t3` ( `dt` int(11), `id` int(11), `value` varchar(8) ) DUPLICATE KEY(dt, id) DISTRIBUTED BY HASH(`id`) BUCKETS 10 PROPERTIES ( "replication_num" = "2", "colocate_with" = "t2" ); ``` t1 join t3 should be colocated. 2 The following operation will get a `Colocate tables must be OLAP table` error before, but now the mysql_t1 colocate group will create successfully. I'm not sure which is the user expected. ``` CREATE TABLE mysql_t1 ( k1 DATE, k2 INT ) ENGINE=mysql PROPERTIES ( "host" = "127.0.0.1", "port" = "8239", "user" = "mysql_user", "password" = "mysql_passwd", "database" = "mysql_db_test", "table" = "mysql_table_test" ); CREATE TABLE `t5` ( `dt` int(11), `id` int(11), `value` varchar(8) ) DUPLICATE KEY(dt, id) PARTITION BY RANGE (dt) ( PARTITION p1 VALUES LESS THAN ("08"), PARTITION p2 VALUES LESS THAN ("09"), PARTITION p3 VALUES LESS THAN ("10") ) DISTRIBUTED BY HASH(`id`) BUCKETS 10 PROPERTIES ( "replication_num" = "2", "colocate_with" = "mysql_t1" ); ```
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
