aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWenchen Fan <wenchen@databricks.com>2016-02-03 08:26:35 +0800
committerYin Huai <yhuai@databricks.com>2016-02-03 08:26:35 +0800
commit672032d0ab1e43bc5a25cecdb1b96dfd35c39778 (patch)
tree5abde6ad94ef9965b092ba46374257e1d6a14f1a /common
parent6de6a97728408ee2619006decf2267cc43eeea0d (diff)
downloadspark-672032d0ab1e43bc5a25cecdb1b96dfd35c39778.tar.gz
spark-672032d0ab1e43bc5a25cecdb1b96dfd35c39778.tar.bz2
spark-672032d0ab1e43bc5a25cecdb1b96dfd35c39778.zip
[SPARK-13020][SQL][TEST] fix random generator for map type
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. This PR fixes this problem by put keys in a set first, to guarantee we have enough keys to build a map with expected length. Author: Wenchen Fan <wenchen@databricks.com> Closes #10930 from cloud-fan/random-generator.
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions