SongJok opened a new issue, #29674:
URL: https://github.com/apache/doris/issues/29674

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.3
   
   ### What's Wrong?
   
   In the same SQL batch,when I use DUPLICATE KEY table data  insert into  
UNIQUE KEY table data,every primary key has one record value for older
   
   ### What You Expected?
   
   In the same SQL batch,I hope latest data merge into table
   
   
   
   ### How to Reproduce?
   
   drop table if exists test.user_info_test;
   CREATE TABLE if not exists test.user_info_test (
     `user_id` int(11) NOT NULL COMMENT '用户ID',
     `age` int(11) NULL DEFAULT "0" COMMENT '年龄',
     `scores` int(11) NULL DEFAULT "0" COMMENT '得分'
   )
   UNIQUE KEY(`user_id`)
   DISTRIBUTED BY HASH(`user_id`) BUCKETS 1
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "enable_unique_key_merge_on_write" = "true"
   );
   
   
   
   insert into test.user_info_test
   (user_id,age,scores)
   select user_id,age,scores 
   from
   (select 6666 user_id ,17 age,1000 scores 
   union all
   select 6666 user_id ,18 age,2000 scores 
   union all
   select 6666 user_id ,19 age,3000 scores 
   union all
   select 6666 user_id ,20 age,4000 scores)that
   -- order by age desc;
   order by age desc;
   
   select * from test.user_info_test ;
   
   ### Anything Else?
   
   After testing, if each primary key data is inserted one by one, it can be 
solved, but it does not comply with the implementation of this function, so 
this should be a bug
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

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