sollhui opened a new pull request, #58850:
URL: https://github.com/apache/doris/pull/58850

   pick #57421
   
   Introduce load job statistic system table:
   ```
   mysql> show create table information_schema.load_jobs\G
   *************************** 1. row ***************************
          Table: load_jobs
   Create Table: CREATE TABLE `load_jobs` (
     `JOB_ID` text NULL,
     `LABEL` text NULL,
     `STATE` text NULL,
     `PROGRESS` text NULL,
     `TYPE` text NULL,
     `ETL_INFO` text NULL,
     `TASK_INFO` text NULL,
     `ERROR_MSG` text NULL,
     `CREATE_TIME` text NULL,
     `ETL_START_TIME` text NULL,
     `ETL_FINISH_TIME` text NULL,
     `LOAD_START_TIME` text NULL,
     `LOAD_FINISH_TIME` text NULL,
     `URL` text NULL,
     `JOB_DETAILS` text NULL,
     `TRANSACTION_ID` text NULL,
     `ERROR_TABLETS` text NULL,
     `USER` text NULL,
     `COMMENT` text NULL,
     `FIRST_ERROR_MSG` text NULL
   ) ENGINE=SCHEMA;
   1 row in set (0.01 sec)
   ```
   
   User can use the `select * from information_schema.load_jobs` instead of the 
`show load`. The advantage is that SQL can be very flexible in locating jobs.
   
   Example:
   ```
   mysql> SELECT * FROM          information_schema.load_jobs     WHERE         
 LABEL = 'test_load_job_label_b5347e94f2614e2c92705d6a6824a380'\G
   *************************** 1. row ***************************
             JOB_ID: 1761643165987
              LABEL: test_load_job_label_b5347e94f2614e2c92705d6a6824a380
              STATE: FINISHED
           PROGRESS: Unknown id: 1761643165987
               TYPE: INSERT
           ETL_INFO: \N
          TASK_INFO: cluster:N/A; timeout(s):14400; max_filter_ratio:0.0
          ERROR_MSG: \N
        CREATE_TIME: 2025-10-28 17:23:08
     ETL_START_TIME: 2025-10-28 17:23:08
    ETL_FINISH_TIME: 2025-10-28 17:23:08
    LOAD_START_TIME: 2025-10-28 17:23:08
   LOAD_FINISH_TIME: 2025-10-28 17:23:09
                URL:
        JOB_DETAILS: 
{"ScannedRows":1,"LoadBytes":25,"FileNumber":0,"FileSize":0,"TaskNumber":1,"Unfinished
 backends":[],"All backends":[1754377661179]}
     TRANSACTION_ID: 72076
      ERROR_TABLETS: {}
               USER: root
            COMMENT:
    FIRST_ERROR_MSG:
   ```
   
   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


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

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