hust-hhb opened a new pull request, #31626:
URL: https://github.com/apache/doris/pull/31626

   ## Proposed changes
   When using update command to set column value, if the column is sequence 
column, the column '__DORIS_SEQUENCE_COL__' should also be set to the same 
value.
   Here is an example:
               CREATE TABLE IF NOT EXISTS table1(
                   user_id bigint,
                   date1 date,
                   group_id bigint
               )
               UNIQUE KEY(user_id)
               DISTRIBUTED BY HASH(user_id) BUCKETS 5 properties(
                   "function_column.sequence_col"='group_id',
                   "replication_num" = "1",
                   "in_memory"="false"
               );
   insert into table1 values(1,'20240131',100);
   insert into table1 values(2,'20240131',100);
   now select * from table , the result is
   1    2024-01-31      100
   2    2024-01-31      100
   
   UPDATE table1  SET group_id=200;
   now select * from table , the result is
   1    2024-01-31      200
   2    2024-01-31      200
   
   insert into table1 values(2,'20240131',100);
   now select * from table , the result is, which is wrong
   1    2024-01-31      200
   2    2024-01-31      100
   
   
   Issue Number: close #xxx
   
   <!--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