You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "924060929 (via GitHub)" <gi...@apache.org> on 2023/04/20 13:58:00 UTC

[GitHub] [doris] 924060929 commented on pull request #18869: [Feature](Nereids)support insert into select.

924060929 commented on PR #18869:
URL: https://github.com/apache/doris/pull/18869#issuecomment-1516381077

   A known bug: insert into unique table without group by unique key will cause the replication different.
   
   3 replications maybe receive the data with different when exchange.
   
   e.g.
   ```
   +-----------+                        +--------------------------+ 
   | machine 1 |        exchange        |   machine 4 (replica 1)  |
   +-----------+                        +--------------------------+
   |   'a'     |                        |       'a', 'b', 'c'      |
   +-----------+                        +--------------------------+
                          \
   
   +-----------+                        +--------------------------+ 
   | machine 2 |                        |   machine 5 (replica 2)  |
   +-----------+          -             +--------------------------+
   |   'b'     |                        |       'c', 'a', 'b'      |
   +-----------+                        +--------------------------+
                          /
   
   +-----------+                        +--------------------------+ 
   | machine 3 |                        |   machine 5 (replica 2)  |
   +-----------+                        +--------------------------+ 
   |   'c'     |                        |       'b', 'c', 'a'      |
   +-----------+                        +--------------------------+
   
   ```
   
   so when insert into the table with unique key, we should let the final instance satisfy the distribution same with the key, and you should add a hash(unique key) require properties to the top of the select


-- 
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-unsubscribe@doris.apache.org

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