[ https://issues.apache.org/jira/browse/BEAM-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15993508#comment-15993508 ]
ASF GitHub Bot commented on BEAM-1336: -------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/beam/pull/2627 > A StateSpec that doesn't care about the key shouldn't be forced to declare it > as type Object > -------------------------------------------------------------------------------------------- > > Key: BEAM-1336 > URL: https://issues.apache.org/jira/browse/BEAM-1336 > Project: Beam > Issue Type: Improvement > Components: sdk-java-core > Reporter: Kenneth Knowles > Assignee: Kenneth Knowles > Priority: Minor > Fix For: First stable release > > > In the state API as it exists today, if (as is almost often the case) you are > writing a {{StateSpec<K, StateT>}} other than a {{KeyedCombiningState}} the > key type is irrelevant and the user just has to write {{Object}} there. This > was carried over from {{StateTag}} and is an artifact of the visitor pattern > there and the difficulty of getting all the types to line up. > I think simplifying the visitor pattern to be more of just a syntax traversal > might alleviate the issue and allow us to drop this noise from the syntax. -- This message was sent by Atlassian JIRA (v6.3.15#6346)