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

   
   ### What problem does this PR solve?
   
   Issue Number: N/A (related to #69928)
   
   Related PR: #69929
   
   **Problem Summary:**
   
   `SHOW CREATE ROUTINE LOAD` currently omits two supported job properties from 
its generated CREATE statement:
   
   - `send_batch_parallelism`
   - `load_to_single_tablet`
   
   Although both properties are accepted by `CREATE ROUTINE LOAD` and 
represented in the job's runtime configuration, they are not included by 
`RoutineLoadJob.getShowCreateInfo()`.
   
   Consequently, the generated DDL does not faithfully represent these 
execution settings. Recreating a job using the generated statement can cause 
the omitted properties to revert to their defaults.
   
   **Changes**
   
   - Include `send_batch_parallelism` and `load_to_single_tablet` in the 
generated `PROPERTIES` clause.
   - Use the existing property constants, runtime getters, and SQL formatting 
helper.
   - Update the existing exact-output unit test to verify both default values.
   - Add a unit test verifying nondefault values and correct property 
formatting.
   
   **Behavior and Compatibility**
   
   Both properties are emitted with their effective runtime values, including 
when their defaults are used. This is consistent with the existing behavior of 
`SHOW CREATE ROUTINE LOAD`, which renders effective values for other job 
properties.
   
   This change affects only the generated DDL. It does not modify Routine Load 
execution, metadata serialization, deserialization, property validation, or 
Kafka progress.
   
   The fix is independently mergeable from #69929, which restores configured 
runtime properties during FE recovery. Both changes are complementary but have 
separate responsibilities.
   
   **Scope and Follow-up**
   
   This PR intentionally addresses only `send_batch_parallelism` and 
`load_to_single_tablet`.
   
   Additional supported properties, including Unique Key update settings, 
workload-group configuration, and CSV formatting options, are also omitted from 
`SHOW CREATE ROUTINE LOAD`.
   
   These omissions will be investigated and addressed separately, with 
additional validation for their respective configuration semantics and SQL 
round-trip behavior.
   
   This PR does not claim to provide complete `SHOW CREATE ROUTINE LOAD` 
configuration fidelity.
   
   ### Release note
   
   `SHOW CREATE ROUTINE LOAD` now includes `send_batch_parallelism` and 
`load_to_single_tablet` in the generated CREATE statement.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [x] 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
   
   **Unit Test**
   
   Extended `RoutineLoadJobTest` to verify:
   
   - Both properties are included with their default values.
   - Nondefault values are correctly represented.
   - Property ordering and SQL formatting remain correct.
   
   Also executed `ShowCreateRoutineLoadCommandTest` to validate the surrounding 
SHOW CREATE command.
   
   **Manual Test**
   
   1. Use an existing paused Routine Load job configured with:
      - `send_batch_parallelism = 2`
      - `load_to_single_tablet = true`
   
   2. Capture the job's configuration and generated CREATE statement before 
deploying the fix.
   
   3. Deploy a development FE containing the SHOW CREATE change.
   
   4. Execute:
   
      ```sql
      SHOW ALL ROUTINE LOAD FOR rl_recovery_new;
      SHOW ALL CREATE ROUTINE LOAD FOR rl_recovery_new;
      ```
   
   5. Verify the generated CREATE statement now includes:
   
      ```sql
      "send_batch_parallelism" = "2",
      "load_to_single_tablet" = "true",
      ```
   
   6. Confirm the job ID, state, effective configuration, and stored Kafka 
progress remain unchanged.
   
   7. Restore the original development FE binary.
   
   **Test Results**
   
   - **Unit Tests — PASSED**
     - `RoutineLoadJobTest` — including the updated exact-output test and the 
new test for nondefault property values.
     - `ShowCreateRoutineLoadCommandTest` — existing command-level tests passed.
   
   - **FE Build — PASSED**
     - `./build.sh --fe` completed successfully.
   
   - **Manual Verification — PASSED**
     - Verified using the existing Routine Load job `rl_recovery_new` in 
`rl_recovery_verify`.
     - Confirmed that `SHOW CREATE ROUTINE LOAD` previously omitted 
`send_batch_parallelism` and `load_to_single_tablet`.
     - Verified that the updated output includes the configured values:
       ```sql
       "send_batch_parallelism" = "2",
       "load_to_single_tablet" = "true",
       ```
     - Confirmed that the job ID, state, configuration, and stored Kafka 
progress remained unchanged.
   
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes.
   
       `SHOW CREATE ROUTINE LOAD` now includes the two previously omitted 
properties.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
       No new SQL syntax or configuration options are introduced.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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