featzhang opened a new pull request, #27612:
URL: https://github.com/apache/flink/pull/27612

   ## What is the purpose of the change
   
   This PR adds ChangelogMode information to the execution plan output for 
streaming queries. Currently, users cannot easily see the changelog semantics 
(INSERT, UPDATE_BEFORE, UPDATE_AFTER, DELETE) of each operator in the execution 
plan, which makes it difficult to understand query behavior and debug issues.
   
   ## Brief change log
   
   - Modified `RelDescriptionWriterImpl.java` to detect `StreamPhysicalRel` 
nodes and extract their ChangelogMode
   - Leveraged existing `ChangelogPlanUtils` utility to get and format 
ChangelogMode information
   - ChangelogMode is now displayed as `changelogMode=[I,UB,UA,D]` in the node 
description
   
   ## Verifying this change
   
   This change can be verified by:
   1. Running any streaming query with `EXPLAIN` statement
   2. Checking that each `StreamPhysicalRel` node in the execution plan now 
shows its ChangelogMode
   3. Verifying the format matches: `changelogMode=[I,UB,UA,D]` where I=INSERT, 
UB=UPDATE_BEFORE, UA=UPDATE_AFTER, D=DELETE, PD=PRIMARY_KEY_DELETE
   
   Example output:
   ```
   Calc(select=[a, b], changelogMode=[I,UB,UA])
   +- TableSourceScan(table=[[my_table]], changelogMode=[I,UB,UA,D])
   ```
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): **no**
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **no**
   - The serializers: **no**
   - The runtime per-record code paths (performance sensitive): **no**
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: **no**
   - The S3 file system connector: **no**
   
   ## Documentation
   
   - Does this pull request introduce a new feature? **no** (it's an 
improvement to existing explain output)
   - If yes, how is the feature documented? **not applicable**
   


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

Reply via email to