decster commented on issue #3469:
URL: 
https://github.com/apache/incubator-doris/issues/3469#issuecomment-626622345


   I think we can attach a set of default values to each writetx, so if update 
became insert, we can fillin default value automatically.
   
   The default value can come from create table statement(each column can have 
a default value), and also come from merge into statement, e.g.
   
   ```
   MERGE sales.category t 
       USING sales.category_staging s
   ON (s.category_id = t.category_id)
   WHEN MATCHED
       THEN UPDATE SET 
           t.amount = s.amount
   WHEN NOT MATCHED BY TARGET 
       THEN INSERT (category_id, category_name, amount)
            VALUES (s.category_id, 'default_name', s.amount)
   WHEN NOT MATCHED BY SOURCE 
       THEN DELETE;
   ```
   


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

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