You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/25 04:33:50 UTC

[GitHub] [incubator-doris] lide-reed opened a new issue, #9210: [Bug] When using Uniq model, we can't update a part of columns, i.e. replace_if_not_null is invalid.

lide-reed opened a new issue, #9210:
URL: https://github.com/apache/incubator-doris/issues/9210

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   dev-1.0.1
   
   ### What's Wrong?
   
   Step 1:
   CREATE TABLE `test1` (
   `goods_id` bigint(20)   ,
   `goods_name` varchar(200),
   `day_sale` int(11) ,
   `date` date 
   )
   UNIQUE KEY(`goods_id`)
   DISTRIBUTED BY HASH(`goods_id`) BUCKETS 10
   PROPERTIES
    (
        "replace_if_not_null" = "true"
    );
    
   Step 2:
   INSERT INTO test1 ( `goods_id`, `goods_name`, `day_sale`, `date` )
   VALUES
           ( 1, "good1", 10, '2022-04-20' ),
           (2, "good2",12,'2022-04-20');
   
   MySQL [test]> select * from test1;
   +----------+------------+----------+------------+
   | goods_id | goods_name | day_sale | date       |
   +----------+------------+----------+------------+
   |        2 | good2      |       12 | 2022-04-20 |
   |        1 | good1      |       10 | 2022-04-20 |
   +----------+------------+----------+------------+
   2 rows in set (0.01 sec)
           
   Step 3:
   INSERT INTO test1 ( `goods_id`, `goods_name`, `day_sale`, `date` )
   VALUES
           ( 1, NULL, 11, '2022-04-20' ),
           (2,NULL,13,'2022-04-20');
   
   MySQL [test]> select * from test1;+----------+------------+----------+------------+
   | goods_id | goods_name | day_sale | date       |
   +----------+------------+----------+------------+
   |        2 | NULL       |       13 | 2022-04-20 |
   |        1 | NULL       |       11 | 2022-04-20 |
   +----------+------------+----------+------------+
   2 rows in set (0.01 sec)
    
   Expect:
   MySQL [test]> select * from test1;
   +----------+------------+----------+------------+
   | goods_id | goods_name | day_sale | date       |
   +----------+------------+----------+------------+
   |        2 | good2      |       13 | 2022-04-20 |
   |        1 | good1      |       11 | 2022-04-20 |
   +----------+------------+----------+------------+
   2 rows in set (0.01 sec)
   
   ### What You Expected?
   
   MySQL [test]> select * from test1;
   +----------+------------+----------+------------+
   | goods_id | goods_name | day_sale | date       |
   +----------+------------+----------+------------+
   |        2 | good2      |       13 | 2022-04-20 |
   |        1 | good1      |       11 | 2022-04-20 |
   +----------+------------+----------+------------+
   2 rows in set (0.01 sec)
   
   Expect it could implement part columns updating.
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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: commits-unsubscribe@doris.apache.org.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


[GitHub] [incubator-doris] Userwhite commented on issue #9210: [Bug] When using Uniq model, we can't update a part of columns, i.e. replace_if_not_null is invalid.

Posted by GitBox <gi...@apache.org>.
Userwhite commented on issue #9210:
URL: https://github.com/apache/incubator-doris/issues/9210#issuecomment-1109260596

   I remember replace_if_not_null is a aggregate method?
   use aggregate table and replace_if_not_null
   


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


[GitHub] [incubator-doris] lide-reed commented on issue #9210: [Bug] When using Uniq model, we can't update a part of columns, i.e. replace_if_not_null is invalid.

Posted by GitBox <gi...@apache.org>.
lide-reed commented on issue #9210:
URL: https://github.com/apache/incubator-doris/issues/9210#issuecomment-1158416033

   refer to: https://zhuanlan.zhihu.com/p/394878570
   Actually it doesn't work.


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