Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11067#discussion_r52002694
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/StreamingListenerSuite.scala
---
@@ -271,11 +274,16 @@ class StreamingListenerSuite extends TestSuiteBase
with Matchers {
}
/** Check if a sequence of numbers is in increasing order */
- def isInIncreasingOrder(seq: Seq[Long]): Boolean = {
- for (i <- 1 until seq.size) {
- if (seq(i - 1) > seq(i)) {
+ def isInIncreasingOrder(data: Iterable[Long]): Boolean = {
--- End diff --
I feel like this can be a Scala one liner by mapping to pairs of successive
elements and calling exists or something to detect a misordering. Minor, not
sure as I'm not at a keyboard to check it
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]