You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Aviem Zur (JIRA)" <ji...@apache.org> on 2017/04/07 08:00:51 UTC
[jira] [Assigned] (BEAM-1336) A StateSpec that doesn't care about
the key shouldn't be forced to declare it as type Object
[ https://issues.apache.org/jira/browse/BEAM-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aviem Zur reassigned BEAM-1336:
-------------------------------
Assignee: (was: Aviem Zur)
> 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
> Priority: Minor
> Labels: starter
>
> 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)