weizuo93 opened a new pull request #6510:
URL: https://github.com/apache/incubator-doris/pull/6510


   ## Proposed changes
   
   Fix #6509
   
   When executing `insert into select ...`, If the amount of data inserted is 0 
rows, `show load` can not work well for this insert operation. This patch is to 
support `show load` for insert 0 row.
   
   ```
   mysql> select * from table_test where citycode < 0;
   Empty set (0.03 sec)
   
   mysql> insert into table_test with label `label-5` select * from table_test 
where citycode < 0;
   Query OK, 0 rows affected (0.08 sec)
   {'label':'label-5', 'status':'ABORTED', 'txnId':'57041', 'err':'all 
partitions have no load data'}
   
   mysql> show load where label = 'label-5';
   
+-------+---------+-----------+-------------------+--------+---------+----------------------------------------------------+----------------------------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+------+---------------------------------------------------------------------------------------------------------+
   | JobId | Label   | State     | Progress          | Type   | EtlInfo | 
TaskInfo                                           | ErrorMsg                   
                              | CreateTime          | EtlStartTime        | 
EtlFinishTime       | LoadStartTime       | LoadFinishTime      | URL  | 
JobDetails                                                                      
                        |
   
+-------+---------+-----------+-------------------+--------+---------+----------------------------------------------------+----------------------------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+------+---------------------------------------------------------------------------------------------------------+
   | 86027 | label-5 | CANCELLED | ETL:N/A; LOAD:N/A | INSERT | NULL    | 
cluster:N/A; timeout(s):3600; max_filter_ratio:0.0 | type:LOAD_RUN_FAIL; 
msg:all partitions have no load data | 2021-08-25 21:43:28 | 2021-08-25 
21:43:28 | 2021-08-25 21:43:28 | 2021-08-25 21:43:28 | 2021-08-25 21:43:28 |    
  | {"Unfinished backends":{},"ScannedRows":0,"TaskNumber":0,"All 
backends":{},"FileNumber":0,"FileSize":0} |
   
+-------+---------+-----------+-------------------+--------+---------+----------------------------------------------------+----------------------------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+------+---------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   ```
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and 
performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   


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