Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/3142
I saw that deprecation but nonetheless the default value is exposed which
is why a consistent behaviour is needed.
Since the state descriptor says "that is the value if nothing is set", I
would find it more consistent if that was true for both use cases of "state",
i.e. inside an operator and as queryable state. It would make things more
complicated for users if it were only true for the operator use, I guess.
If the default value is not used, however, it is set to `null` internally
and so `null` is returned anyway only at the penalty of this one check that the
actual value is `null`
---
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.
---