qzsee opened a new pull request, #21906:
URL: https://github.com/apache/doris/pull/21906

   ## Proposed changes
   
   for example
   
   ```sql
   CREATE TABLE `colocate_a` (
    dt date,
    k1 int,
    v1 int
   ) ENGINE=OLAP
   DUPLICATE KEY(`k1`)
   PARTITION BY RANGE(`dt`)
   (PARTITION p1 VALUES [('2022-10-02'), ('2022-10-03'))
   DISTRIBUTED BY HASH(`k1`) BUCKETS 2
   PROPERTIES (
   "replication_num" = "3",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   
   ALTER TABLE colocate_a set ("colocate_with" = "ab");
   
   CREATE TABLE `colocate_b` (
    dt date,
    k1 int,
    v1 int
   ) ENGINE=OLAP
   DUPLICATE KEY(`k1`)
   PARTITION BY RANGE(`dt`)
   (PARTITION p1 VALUES [('2022-10-02'), ('2022-10-03'))
   DISTRIBUTED BY HASH(`k1`) BUCKETS 2
   PROPERTIES (
   "replication_num" = "3",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   
   ALTER TABLE colocate_b ADD PARTITION p2 VALUES 
[("2022-10-03"),("2022-10-04")) DISTRIBUTED BY HASH(k1) BUCKETS 10;
   
   ALTER TABLE colocate_b set ("colocate_with" = "ab");
   ```
   
   table `colocate_b` partition p2 set bucket num is 10 then take it into group 
`ab`.
   
   In `ColocateTableCheckerAndBalancer` matchGroup occur :
   ```
   java.lang.IllegalStateException: 2 vs. 10
   303861     at 
com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
~[guava-30.0-jre.jar:?]
   303862     at 
org.apache.doris.clone.ColocateTableCheckerAndBalancer.matchGroup(ColocateTableCheckerAndBalancer.java:242)
 ~[doris-fe.jar:1.2-SNAPSHOT]
   303863     at 
org.apache.doris.clone.ColocateTableCheckerAndBalancer.runAfterCatalogReady(ColocateTableCheckerAndBalancer.java:95)
 ~[doris-fe.jar:1.2-SNAPSHOT]
   303864     at 
org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) 
~[doris-fe.jar:1.2-SNAPSHOT]
   303865     at org.apache.doris.common.util.Daemon.run(Daemon.java:116) 
~[doris-fe.jar:1.2-SNAPSHOT]
   ```
   
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to