Skip to content

Commit 4b6e777

Browse files
committed
infix operator style fix
1 parent 4391d3b commit 4b6e777

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/main/scala/org/apache/spark/rdd/AsyncRDDActions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class AsyncRDDActions[T: ClassTag](self: RDD[T]) extends Serializable with Loggi
8585
numPartsToTry = partsScanned * 4
8686
} else {
8787
// the left side of max is >=1 whenever partsScanned >= 2
88-
numPartsToTry = ((1.5 * num * partsScanned / results.size).toInt - partsScanned) max 1
89-
numPartsToTry = numPartsToTry min (partsScanned * 4)
88+
numPartsToTry = Math.max((1.5 * num * partsScanned / results.size).toInt - partsScanned, 1)
89+
numPartsToTry = Math.min(numPartsToTry, partsScanned * 4)
9090
}
9191
}
9292

core/src/main/scala/org/apache/spark/rdd/RDD.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,8 @@ abstract class RDD[T: ClassTag](
10861086
numPartsToTry = partsScanned * 4
10871087
} else {
10881088
// the left side of max is >=1 whenever partsScanned >= 2
1089-
numPartsToTry = ((1.5 * num * partsScanned / buf.size).toInt - partsScanned) max 1
1090-
numPartsToTry = numPartsToTry min (partsScanned * 4)
1089+
numPartsToTry = Math.max((1.5 * num * partsScanned / buf.size).toInt - partsScanned, 1)
1090+
numPartsToTry = Math.min(numPartsToTry, partsScanned * 4)
10911091
}
10921092
}
10931093

0 commit comments

Comments
 (0)