xinghuayu007 opened a new issue #4620:
URL: https://github.com/apache/incubator-doris/issues/4620


   **Describe the bug**
   In LoadingTaskPlanner#Plan():  OlapTableSink olapTableSink = new 
OlapTableSink(table, tupleDesc, partitionIds); If the table does not has any 
partition, Preconditions.checkState will throw IllegalStateException, but the 
funtion only cath UserException, that will cause load job status can not be 
updated。
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create a table without partition:
   CREATE TABLE table1
   (
       event_day DATE,
       siteid INT DEFAULT '10',
       citycode SMALLINT,
       username VARCHAR(32) DEFAULT '',
       pv BIGINT SUM DEFAULT '0'
   )
   AGGREGATE KEY(event_day, siteid, citycode, username)
   PARTITION BY RANGE(event_day)()
   DISTRIBUTED BY HASH(siteid) BUCKETS 10
   PROPERTIES("replication_num" = "1");
   2. broker load job:
   LOAD LABEL db1.label1
   (
       DATA INFILE("hdfs://abc.com:8888/user/palo/test/ml/file1")
       INTO TABLE tbl1
       COLUMNS TERMINATED BY ","
       (event_date,siteid,citycode,username,pv)
       SET
       (
           date=event_date,
           id=siteid,
           code=citycode,
           name=username
           count=pv
       ),
   )
   WITH BROKER 'broker'
   (
       "username"="user",
       "password"="pass"
   )
   PROPERTIES
   (
       "timeout" = "3600"
   );
   3. error log:
   ![2020-09-17 
20-08-42屏幕截图](https://user-images.githubusercontent.com/12771191/93468502-a7a3fa80-f921-11ea-813c-476526adf4df.png)
   
   4. job status not be updated
   
![img_bec2b4ee-94de-4276-a4c2-6bfa87b4098l](https://user-images.githubusercontent.com/12771191/93468562-c4d8c900-f921-11ea-8e3f-8ad70810560f.png)
   
   
   **Expected behavior**
   when IllegalStateException happed, job status should be updated to 
"CANCELLED"
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
    - Browser [e.g. chrome, safari]
    - Version [e.g. 22]
   
   **Smartphone (please complete the following information):**
    - Device: [e.g. iPhone6]
    - OS: [e.g. iOS8.1]
    - Browser [e.g. stock browser, safari]
    - Version [e.g. 22]
   
   **Additional context**
   Add any other context about the problem here.
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to