You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Kenneth Knowles (JIRA)" <ji...@apache.org> on 2017/01/28 15:37:24 UTC
[jira] [Created] (BEAM-1336) A StateSpec that doesn't care about
the key shouldn't be forced to declare it as type Object
Kenneth Knowles created BEAM-1336:
-------------------------------------
Summary: 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
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.4#6332)