Skip to content

Commit 4d2ceeb

Browse files
committed
Merge branch 'master' into disable-fast-double-parser-logs-in-tests
2 parents 77b4363 + 19baaba commit 4d2ceeb

File tree

2 files changed

+20
-17
lines changed
  • core
    • generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api
    • src/test/kotlin/org/jetbrains/kotlinx/dataframe/api

2 files changed

+20
-17
lines changed

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/statistics.kt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,15 @@ class StatisticsTests {
148148
"city",
149149
"name",
150150
"age",
151+
"weight",
151152
"height",
152-
"yearsToRetirement"
153-
) // TODO: why double values from weight are not in the list? are they not Comparable?
153+
"yearsToRetirement",
154+
)
154155

155156
val median01 = res0["age"][0] as Int
156157
median01 shouldBe 22
157-
//val median02 = res0["weight"][0] as Double
158-
//median02 shouldBe 66.0
158+
// val median02 = res0["weight"][0] as Double
159+
// median02 shouldBe 66.0
159160

160161
// scenario #1: particular column
161162
val res1 = personsDf.groupBy("city").medianFor("age")
@@ -276,14 +277,15 @@ class StatisticsTests {
276277
"city",
277278
"name",
278279
"age",
280+
"weight",
279281
"height",
280-
"yearsToRetirement"
281-
) // TODO: why it's working for height and doesn't work for Double column weight
282+
"yearsToRetirement",
283+
)
282284

283285
val min01 = res0["age"][0] as Int
284286
min01 shouldBe 15
285-
//val min02 = res0["weight"][0] as Double
286-
//min02 shouldBe 38.85756039691633
287+
// val min02 = res0["weight"][0] as Double
288+
// min02 shouldBe 38.85756039691633
287289

288290
// scenario #1: particular column
289291
val res1 = personsDf.groupBy("city").minFor("age")
@@ -342,7 +344,7 @@ class StatisticsTests {
342344
"age",
343345
"weight",
344346
"height",
345-
"yearsToRetirement"
347+
"yearsToRetirement",
346348
) // TODO: why is here weight presented? looks like inconsitency
347349

348350
val min41 = res4["age"][0] as Int
@@ -362,12 +364,12 @@ class StatisticsTests {
362364
fun `max on GroupBy`() {
363365
// scenario #0: all numerical columns
364366
val res0 = personsDf.groupBy("city").max()
365-
res0.columnNames() shouldBe listOf("city", "name", "age", "height", "yearsToRetirement") // TODO: DOUBLE weight?
367+
res0.columnNames() shouldBe listOf("city", "name", "age", "weight", "height", "yearsToRetirement")
366368

367369
val max01 = res0["age"][0] as Int
368370
max01 shouldBe 35
369-
//val max02 = res0["weight"][0] as Double
370-
//max02 shouldBe 140.0
371+
// val max02 = res0["weight"][0] as Double
372+
// max02 shouldBe 140.0
371373

372374
// scenario #1: particular column
373375
val res1 = personsDf.groupBy("city").maxFor("age")
@@ -426,7 +428,7 @@ class StatisticsTests {
426428
"age",
427429
"weight",
428430
"height",
429-
"yearsToRetirement"
431+
"yearsToRetirement",
430432
) // TODO: weight is here?
431433

432434
val max41 = res4["age"][0] as Int
@@ -442,4 +444,3 @@ class StatisticsTests {
442444
max51 shouldBe 35
443445
}
444446
}
445-

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/statistics.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ class StatisticsTests {
148148
"city",
149149
"name",
150150
"age",
151+
"weight",
151152
"height",
152153
"yearsToRetirement",
153-
) // TODO: why double values from weight are not in the list? are they not Comparable?
154+
)
154155

155156
val median01 = res0["age"][0] as Int
156157
median01 shouldBe 22
@@ -276,9 +277,10 @@ class StatisticsTests {
276277
"city",
277278
"name",
278279
"age",
280+
"weight",
279281
"height",
280282
"yearsToRetirement",
281-
) // TODO: why it's working for height and doesn't work for Double column weight
283+
)
282284

283285
val min01 = res0["age"][0] as Int
284286
min01 shouldBe 15
@@ -362,7 +364,7 @@ class StatisticsTests {
362364
fun `max on GroupBy`() {
363365
// scenario #0: all numerical columns
364366
val res0 = personsDf.groupBy("city").max()
365-
res0.columnNames() shouldBe listOf("city", "name", "age", "height", "yearsToRetirement") // TODO: DOUBLE weight?
367+
res0.columnNames() shouldBe listOf("city", "name", "age", "weight", "height", "yearsToRetirement")
366368

367369
val max01 = res0["age"][0] as Int
368370
max01 shouldBe 35

0 commit comments

Comments
 (0)