Skip to content

Commit 518d1a1

Browse files
authored
Update ApiTest.kt
Apparently this is expected behavior: https://issues.apache.org/jira/browse/SPARK-38317
1 parent 5d785e0 commit 518d1a1

File tree

1 file changed

+2
-4
lines changed
  • kotlin-spark-api/3.2/src/test/kotlin/org/jetbrains/kotlinx/spark/api

1 file changed

+2
-4
lines changed

kotlin-spark-api/3.2/src/test/kotlin/org/jetbrains/kotlinx/spark/api/ApiTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,7 @@ class ApiTest : ShouldSpec({
366366
dataset.collectAsList().let {
367367
it[0] shouldBe Period.ZERO
368368

369-
// TODO this is also broken in Scala. It reports a Period of 0 instead of 2 days
370-
// https://issues.apache.org/jira/browse/SPARK-38317
371-
// it[1] shouldBe Period.ofDays(2)
369+
// NOTE Spark truncates java.time.Period to months.
372370
it[1] shouldBe Period.ofDays(0)
373371
}
374372

@@ -736,4 +734,4 @@ data class ComplexEnumDataClass(
736734
data class NullFieldAbleDataClass(
737735
val optionList: List<Int>?,
738736
val optionMap: Map<String, Int>?
739-
)
737+
)

0 commit comments

Comments
 (0)