{"action":"closed","issue":{"url":"https://api.github.com/repos/databricks/spark-avro/issues/102","labels_url":"https://api.github.com/repos/databricks/spark-avro/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/databricks/spark-avro/issues/102/comments","events_url":"https://api.github.com/repos/databricks/spark-avro/issues/102/events","html_url":"https://github.com/databricks/spark-avro/issues/102","id":117420004,"number":102,"title":"Incorrect results with reduceByKey","user":{"login":"tovbinm","id":629845,"avatar_url":"https://avatars.githubusercontent.com/u/629845?v=3","gravatar_id":"","url":"https://api.github.com/users/tovbinm","html_url":"https://github.com/tovbinm","followers_url":"https://api.github.com/users/tovbinm/followers","following_url":"https://api.github.com/users/tovbinm/following{/other_user}","gists_url":"https://api.github.com/users/tovbinm/gists{/gist_id}","starred_url":"https://api.github.com/users/tovbinm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovbinm/subscriptions","organizations_url":"https://api.github.com/users/tovbinm/orgs","repos_url":"https://api.github.com/users/tovbinm/repos","events_url":"https://api.github.com/users/tovbinm/events{/privacy}","received_events_url":"https://api.github.com/users/tovbinm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-17T18:35:58Z","updated_at":"2015-11-17T18:47:44Z","closed_at":"2015-11-17T18:47:44Z","body":"Howdy,\r\n\r\nWe've noticed a strange behavior with Avro serialized data and reduceByKey RDD functionality. Please see below:\r\n```scala\r\nval data: RDD[T] = sparkContext.hadoopFile(path, classOf[AvroInputFormat[T]], classOf[AvroWrapper[T]], classOf[NullWritable]) // we're reading an avro serialized data\r\nval bad: RDD[(String,List[T])]  = data.map(r => (r.id, List(r))).reduceByKey(_ ++ _) // incorrect data returned\r\nval good: RDD[(String,List[T])] = data.map(r => (r.id, List(r))).partitionBy(Partitioner.defaultPartitioner(data)).reduceByKey(_ ++ _) // OK, as expected\r\n```\r\nAny ideas? \r\n\r\nThanks in advance.\r\n\r\n"}}