davidradl commented on code in PR #26396:
URL: https://github.com/apache/flink/pull/26396#discussion_r2028962914


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/generated/ProcessTableRunner.java:
##########
@@ -183,34 +184,53 @@ private void processMethod(RunnableWithException method) 
throws Exception {
         }
     }
 
+    @SuppressWarnings("unchecked")
     private void moveStateToFunction() throws IOException {
         Arrays.fill(stateCleared, false);
         for (int i = 0; i < stateHandles.length; i++) {
-            final RowData value = stateHandles[i].value();
-            stateToFunction[i] = value;
+            final State stateHandle = stateHandles[i];
+            if (!(stateHandle instanceof ValueState)) {

Review Comment:
   > I'm following the [early return 
principle](https://dev.to/shameel/-clean-coding-tip-early-return-principle-47kj)
 here. I think in the end this is a matter of taste. Feel free to code it 
differently in your PRs.
   
   ok no worries. 



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