Skip to content

Commit 7721fff

Browse files
committed
Fix test which doesn't seem to be in reality
1 parent 4815d9a commit 7721fff

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSinkLog.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ class FileStreamSinkLog(
104104

105105
object FileStreamSinkLog {
106106
val VERSION = 1
107+
// TODO: This action hasn't been used from the introduction. We should just remove this.
108+
// TODO: We can remove the field "action" as well, ignoring "action" in existing metadata log.
107109
val DELETE_ACTION = "delete"
108110
val ADD_ACTION = "add"
109111
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
v1
22
{"path":"/a/b/8","size":800,"isDir":false,"modificationTime":800,"blockReplication":1,"blockSize":100,"action":"add"}
3-
{"path":"/a/b/0","size":100,"isDir":false,"modificationTime":100,"blockReplication":1,"blockSize":100,"action":"delete"}

sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/FileStreamSinkLogSuite.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,9 @@ class FileStreamSinkLogSuite extends SparkFunSuite with SharedSparkSession {
227227
}
228228
}
229229

230-
// FIXME: sigh, we should really remove ACTION which is always ADD_ACTION...
231-
// DELETE_ACTION exists "hypothetically". It prevents streamlining of handling entries.
232-
ignore("read Spark 2.1.0 log format") {
230+
test("read Spark 2.1.0 log format") {
233231
assert(readFromResource("file-sink-log-version-2.1.0") === Seq(
234-
// SinkFileStatus("/a/b/0", 100, false, 100, 1, 100, FileStreamSinkLog.ADD_ACTION), -> deleted
232+
SinkFileStatus("/a/b/0", 1, false, 1, 1, 100, FileStreamSinkLog.ADD_ACTION),
235233
SinkFileStatus("/a/b/1", 100, false, 100, 1, 100, FileStreamSinkLog.ADD_ACTION),
236234
SinkFileStatus("/a/b/2", 200, false, 200, 1, 100, FileStreamSinkLog.ADD_ACTION),
237235
SinkFileStatus("/a/b/3", 300, false, 300, 1, 100, FileStreamSinkLog.ADD_ACTION),

0 commit comments

Comments
 (0)