1996fanrui commented on PR #21690: URL: https://github.com/apache/flink/pull/21690#issuecomment-1386744572
I saw the `PushingAsyncDataInput#emitNext` and `SourceReader#pollNext` returns the `InputStatus`. It's similar to `DataOutput#emitRecord`. So sounds good to me, +1 for `DataOutput#emitRecord should return a boolean` determine whether `it can continue to emit records`. @lindong28 , what do you think? If it's ok, `ReaderOutput#collect` and `RecordEmitter#emitRecord` should return a boolean as well. And the loop will be moved from `SourceOperator#emitNext` to `SourceReader#pollNext`. Because: - `SourceReader#pollNext` just returns `InputStatus`, so `SourceOperator#emitNext` doesn't know whether it can continue to emit records. - All sub-class of `SourceReader` can do the loop inside of the `SourceReader#pollNext`. If it's right, we should do it in the `IteratorSourceReader` and `SourceReaderBase`. Please correct me if I'm wrong, thanks~ -- 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