Github user tillrohrmann commented on the pull request:
https://github.com/apache/flink/pull/936#issuecomment-125175011
I don't know of a better solution than the current approach if we want to
support the `stateByKey` parameter. I agree with Aljoscha that
`ds.mapWithState({ (x, o) => (x, o) }, true)` does not look really nice and you
will always have it if you have a multi line UDF.
I was wondering whether we can get rid of the `stateByKey` parameter. Is
there any use case in which you have a `KeyedDataStream` and set `stateByKey`
to false? Otherwise we could override the `*WithState` methods in
`KeyedDataStream` and per default the `StatefulFunction` sets the `partitioned`
field to `false`?
Other than that, the PR looks really good and I like it a lot :-)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---