zoudan commented on code in PR #23849:
URL: https://github.com/apache/flink/pull/23849#discussion_r1416588553


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/ResultProvider.java:
##########
@@ -59,4 +59,7 @@ public interface ResultProvider {
      * {@link CloseableIterator#next()} method returns a row.
      */
     boolean isFirstRowReady();
+
+    /** Reset this ResultProvider to the origin state when we create it. */
+    default void reset() {}

Review Comment:
   `CollectResultProvider` uses a field `iterator` of Outer class 
`CollectDynamicSink`, and it is **lazily created** in 
DataStreamSinkProvider#consumeDataStream(which is called when translate 
`DynamicTableSink` into a Transformation). So it is hard to recreate a new 
`CollectResultProvider` when we hit a plan cache as our caches store 
Transformations and will not create new Transformations.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to