LadyForest commented on code in PR #22593:
URL: https://github.com/apache/flink/pull/22593#discussion_r1201603033


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecChangelogNormalize.java:
##########
@@ -71,20 +75,36 @@
         producedTransformations = 
StreamExecChangelogNormalize.CHANGELOG_NORMALIZE_TRANSFORMATION,
         minPlanVersion = FlinkVersion.v1_15,
         minStateVersion = FlinkVersion.v1_15)
+@ExecNodeMetadata(
+        name = "stream-exec-changelog-normalize",
+        version = 2,

Review Comment:
   > Do we really need to introduce a new version ? Because the topology and 
state layout do not change,
   
   I also hesitated for a long time on this point. Introducing `StateMetadata` 
did not actually change the state layout, but the FLIP-190 design document 
provides an example of upgrading the exec node version after adding a member 
variable.
   > The JSON node of ExecNode A gets an additional property in Flink 1.16:
   > 
   >  Before:
   >
   >  {
   >    some-prop: 42
   >   }
   >  After:
   >
   > {
   >  some-prop: 42,
   >  some-flag: false
   > }
   >
   > Every plan change will increase the ExecNode version. Since the ExecNode 
supports both plan layouts, adding an  additional annotation is enough.
   >
   > @ExecNodeMetadata(name=A, version=1, minPlanVersion=1.15, 
minStateVersion=1.15)
   > @ExecNodeMetadata(name=A, version=2, minPlanVersion=1.16, 
minStateVersion=1.15)
   > class MyExecNode extends ExecNode {...}
   > New plans will use the new ExecNode version 2.



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