{"action":"created","issue":{"url":"https://api.github.com/repos/twitter/summingbird/issues/580","labels_url":"https://api.github.com/repos/twitter/summingbird/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/twitter/summingbird/issues/580/comments","events_url":"https://api.github.com/repos/twitter/summingbird/issues/580/events","html_url":"https://github.com/twitter/summingbird/pull/580","id":54276376,"number":580,"title":"IdentityKeyedProducer in ValueFlatMapToFlatMap  Dag Optimizer rule","user":{"login":"egonina","id":3441503,"avatar_url":"https://avatars.githubusercontent.com/u/3441503?v=3","gravatar_id":"","url":"https://api.github.com/users/egonina","html_url":"https://github.com/egonina","followers_url":"https://api.github.com/users/egonina/followers","following_url":"https://api.github.com/users/egonina/following{/other_user}","gists_url":"https://api.github.com/users/egonina/gists{/gist_id}","starred_url":"https://api.github.com/users/egonina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonina/subscriptions","organizations_url":"https://api.github.com/users/egonina/orgs","repos_url":"https://api.github.com/users/egonina/repos","events_url":"https://api.github.com/users/egonina/events{/privacy}","received_events_url":"https://api.github.com/users/egonina/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-14T02:22:48Z","updated_at":"2015-01-23T19:31:08Z","closed_at":"2015-01-23T19:28:19Z","pull_request":{"url":"https://api.github.com/repos/twitter/summingbird/pulls/580","html_url":"https://github.com/twitter/summingbird/pull/580","diff_url":"https://github.com/twitter/summingbird/pull/580.diff","patch_url":"https://github.com/twitter/summingbird/pull/580.patch"},"body":"We were downcasting ValueFlatMappedProducer to FlatMappedProducer in the ValueFlatMapToFlatMap DagOptimizer rule thus causing ClassCastExceptions when trying to cast to a KeyedProducer during planning. This wraps the cast in an IdentityKeyedProducer to preserve the fact that this is a KeyedProducer. Adds a test as well. "},"comment":{"url":"https://api.github.com/repos/twitter/summingbird/issues/comments/71250737","html_url":"https://github.com/twitter/summingbird/pull/580#issuecomment-71250737","issue_url":"https://api.github.com/repos/twitter/summingbird/issues/580","id":71250737,"user":{"login":"johnynek","id":67958,"avatar_url":"https://avatars.githubusercontent.com/u/67958?v=3","gravatar_id":"","url":"https://api.github.com/users/johnynek","html_url":"https://github.com/johnynek","followers_url":"https://api.github.com/users/johnynek/followers","following_url":"https://api.github.com/users/johnynek/following{/other_user}","gists_url":"https://api.github.com/users/johnynek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnynek/subscriptions","organizations_url":"https://api.github.com/users/johnynek/orgs","repos_url":"https://api.github.com/users/johnynek/repos","events_url":"https://api.github.com/users/johnynek/events{/privacy}","received_events_url":"https://api.github.com/users/johnynek/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T19:31:08Z","updated_at":"2015-01-23T19:31:08Z","body":"My point is that this is being fixed at the wrong place.\r\n\r\nThe cast should be removed in the original code, not in the Dag code.\r\n\r\nFor instance, I think just casting to `Producer[(K, V)]` would have worked in the area that was throwing."}}