{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/10930","labels_url":"https://api.github.com/repos/apache/spark/issues/10930/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/10930/comments","events_url":"https://api.github.com/repos/apache/spark/issues/10930/events","html_url":"https://github.com/apache/spark/pull/10930","id":128967137,"number":10930,"title":"[SPARK-13020][SQL][test] fix random generator for map type","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2016-01-26T22:43:46Z","updated_at":"2016-01-29T03:31:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/10930","html_url":"https://github.com/apache/spark/pull/10930","diff_url":"https://github.com/apache/spark/pull/10930.diff","patch_url":"https://github.com/apache/spark/pull/10930.patch"},"body":"when we generate map, we first randomly pick a length, then create a seq of key value pair with the expected length, and finally call `toMap`. However, `toMap` will remove all duplicated keys, which makes the actual map size much less than we expected.\r\n\r\nThis PR fixes this problem by put keys in a set first, to guarantee we have enough keys to build a map with expected length."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/176553572","html_url":"https://github.com/apache/spark/pull/10930#issuecomment-176553572","issue_url":"https://api.github.com/repos/apache/spark/issues/10930","id":176553572,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T03:31:01Z","updated_at":"2016-01-29T03:31:01Z","body":"Merged build finished. Test FAILed."}}