aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala
diff options
context:
space:
mode:
Diffstat (limited to 'sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala')
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala19
1 files changed, 4 insertions, 15 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala
index 2cc012840d..1f52abf277 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala
@@ -19,19 +19,8 @@ package org.apache.spark.sql.execution.streaming
/**
* An offset is a monotonically increasing metric used to track progress in the computation of a
- * stream. An [[Offset]] must be comparable, and the result of `compareTo` must be consistent
- * with `equals` and `hashcode`.
+ * stream. Since offsets are retrieved from a [[Source]] by a single thread, we know the global
+ * ordering of two [[Offset]] instances. We do assume that if two offsets are `equal` then no
+ * new data has arrived.
*/
-trait Offset extends Serializable {
-
- /**
- * Returns a negative integer, zero, or a positive integer as this object is less than, equal to,
- * or greater than the specified object.
- */
- def compareTo(other: Offset): Int
-
- def >(other: Offset): Boolean = compareTo(other) > 0
- def <(other: Offset): Boolean = compareTo(other) < 0
- def <=(other: Offset): Boolean = compareTo(other) <= 0
- def >=(other: Offset): Boolean = compareTo(other) >= 0
-}
+trait Offset extends Serializable {}