Skip to content

Commit

Permalink
Try 700
Browse files Browse the repository at this point in the history
  • Loading branch information
longvu-db committed Sep 22, 2024
1 parent 77ee00f commit aadfb4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,19 @@ class ClientE2ETestSuite

test("spark deep recursion") {
var df = spark.range(1)
assert(spark.conf.get("spark.connect.grpc.marshallerRecursionLimit").toInt == 2048)
assert(spark.conf.get("spark.connect.grpc.marshallerRecursionLimit").toInt == 4096)
// spark.connect.grpc.marshallerRecursionLimit must be at least 2048, to handle certain
// deep recursion cases.
for (a <- 1 to 1900) {
for (a <- 1 to 700) {
df = df.union(spark.range(a, a + 1))
}
assert(df.collect().length == 1901)
assert(df.collect().length == 701)
}

test("handle unknown exception") {
var df = spark.range(1)
val limit = spark.conf.get("spark.connect.grpc.marshallerRecursionLimit").toInt
for (a <- 1 to limit) {
for (a <- 1 to 1500) {
df = df.union(spark.range(a, a + 1))
}
val ex = intercept[SparkException] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ private[sql] object ConnectCommon {
val CONNECT_GRPC_BINDING_PORT: Int = 15002
val CONNECT_GRPC_PORT_MAX_RETRIES: Int = 0
val CONNECT_GRPC_MAX_MESSAGE_SIZE: Int = 128 * 1024 * 1024
val CONNECT_GRPC_MARSHALLER_RECURSION_LIMIT: Int = 2048
val CONNECT_GRPC_MARSHALLER_RECURSION_LIMIT: Int = 4096
}

0 comments on commit aadfb4f

Please sign in to comment.