pvary commented on code in PR #24022: URL: https://github.com/apache/flink/pull/24022#discussion_r1445985861
########## flink-core/src/main/java/org/apache/flink/api/connector/sink2/StatefulSink.java: ########## @@ -36,49 +34,43 @@ * @param <WriterStateT> The type of the sink writer's state */ @PublicEvolving -public interface StatefulSink<InputT, WriterStateT> extends Sink<InputT> { +@Deprecated +public interface StatefulSink<InputT, WriterStateT> + extends Sink<InputT>, SupportsWriterState<InputT, WriterStateT> { /** - * Create a {@link StatefulSinkWriter}. + * Create a {@link org.apache.flink.api.connector.sink2.StatefulSinkWriter} from a recovered + * state. * * @param context the runtime context. * @return A sink writer. * @throws IOException for any failure during creation. */ - StatefulSinkWriter<InputT, WriterStateT> createWriter(InitContext context) throws IOException; Review Comment: Oh.. I get it. If someone expect the writer to be a SinkWriter, they need to cast it after this change... That's a valid point. OTOH, this change is really needed to make the API evolvable and accepted in FLIP-372. What should we do? -- 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