-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-8364][state backend] Add iterator() to ListState which returns empty iterator when it has no value #5356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… when it has no value
I wonder why we need to introduce a separate method for an iterator instead of just changing the |
@StefanRRichter that would be an (IMO unnecessary) API breaking change. See the comments on FLINK-8364. |
Ok, that is not so nice IMHO for an API, but if you think this might break some code then we have to keep it. Nevertheless, I still doubt about any additional value from the new method that is introduced by this PR. If we cannot change the old method, then I do not see a big benefit and this might not be worth having more methods in the API to maintain. What do you think @fhueske and @aljoscha ? |
I also agree that changing From a user point of view, I found that receiving Frankly, the |
I still do not believe that this is a significant improvement, and may even increase confusion: Now you have two slightly different ways to do almost the same thing, in one case you need to take care of |
@StefanRRichter I think how |
I am wondering whether this discussion is a bit confused. All state facing the user in the APIs already has the behavior that there is no So, is this a non-issue, actually? Something that may only affect test implementations of |
hmmm.... I think you are right, this actually might be a non-issue in the first place |
What is the purpose of the change
Add iterator() to ListState which returns empty iterator when it has no value
Brief change log
Add iterator() to ListState which returns empty iterator when it has no value
Verifying this change
This change added tests and can be verified by extending
StateBackendTestBase#testListStateAPIs()
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes)Documentation