We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a156b8 commit 09a27f7Copy full SHA for 09a27f7
python/pyspark/rdd.py
@@ -1035,7 +1035,7 @@ def take(self, num):
1035
# try all partitions next. Otherwise, interpolate the number
1036
# of partitions we need to try, but overestimate it by 50%.
1037
if len(items) == 0:
1038
- numPartsToTry = totalParts - 1
+ numPartsToTry = partsScanned * 2
1039
else:
1040
numPartsToTry = int(1.5 * num * partsScanned / len(items))
1041
0 commit comments