apache/beam

ValueState could use an initial/default value

Open

#18,174 opened on Jun 3, 2022

View on GitHub
 (5 comments) (0 reactions) (1 assignee)Java (4,097 forks)batch import
P3coregood first issueimprovementjava

Repository metrics

Stars
 (7,313 stars)
PR merge metrics
 (Avg merge 6d) (243 merged PRs in 30d)

Description

In writing example state code with ValueState there is almost always a use of firstNonNull(state.read(), defaultValue). It would be nice to bake this into the declaration.

Imported from Jira BEAM-1335. Original Jira may contain additional context. Reported by: kenn.

Contributor guide