Skip to content

Commit c94b70d

Browse files
committed
Updates examples to remove russian lang
1 parent 3d17149 commit c94b70d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Diff for: examples/src/main/kotlin/org/jetbrains/spark/api/examples/Main.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ object Main {
4242

4343

4444
val pairs = spark
45-
.toDS(listOf(2 to "ад", 4 to "луна", 6 to "ягодка"))
45+
.toDS(listOf(2 to "hell", 4 to "moon", 6 to "berry"))
4646

4747
triples
4848
.leftJoin(pairs, triples.col("first").multiply(2).eq(pairs.col("first")))

Diff for: examples/src/main/kotlin/org/jetbrains/spark/api/examples/MapAndListOperations.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ package org.jetbrains.spark.api.examples
2222
import org.jetbrains.spark.api.*
2323

2424
fun main() {
25-
withSpark(props = mapOf("spark.sql.codegen.wholeStage" to false)) {
25+
withSpark(props = mapOf("spark.sql.codegen.wholeStage" to true)) {
2626
dsOf(mapOf(1 to c(1, 2, 3), 2 to c(1, 2, 3)), mapOf(3 to c(1, 2, 3), 4 to c(1, 2, 3)))
2727
.flatMap { it.toList().map { p -> listOf(p.first, p.second._1, p.second._2, p.second._3) }.iterator() }
2828
.flatten()
2929
.map { c(it) }
3030
.also { it.printSchema() }
3131
.distinct()
32-
.sort("a")
32+
.sort("_1")
3333
.debugCodegen()
3434
.show()
3535
}

Diff for: examples/src/main/kotlin/org/jetbrains/spark/api/examples/NonWorkingExample.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ import org.jetbrains.spark.api.*
2323

2424
/**
2525
* Currently doesn't work because of [[https://issues.apache.org/jira/browse/SPARK-31854]]
26+
* But works with `spark.sql.codegen.wholeStage` turned off.
27+
* Fixed in 2.4.7 and 3.0.0-preview3
2628
*/
2729
fun main() {
28-
withSpark(props = mapOf("spark.sql.codegen.wholeStage" to true)) {
30+
withSpark(props = mapOf("spark.sql.codegen.wholeStage" to false)) {
2931
dsOf(1, null, 2)
3032
.map { c(it) }
3133
.show()

0 commit comments

Comments
 (0)