Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ class BroadcastExchangeSuite extends SparkPlanTest
broadcastExchangeNode.resetMetrics()
assert(metrics("numOutputRows").value == 1)
}

test("SPARK-56455: broadcast should fail when table size exceeds maxBroadcastTableSize") {
withSQLConf(SQLConf.MAX_BROADCAST_TABLE_SIZE.key -> "100") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this negative case, yes. I agree that it seems that we didn't have explicitly before. Could you revise the PR title and test case name specifically for this because the current PR title, "Add test coverage for maxBroadcastTableSize config enforcement", is too broad and ignores the existing test coverage.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. Could i change the title as "Add test for broadcast failure when exceeding maxBroadcastTableSize"? This seems to be appropriate for the test coverage. Do let me know your thoughts. Thanks!

val df = spark.range(1000).toDF()
val joinDF = df.join(broadcast(df), "id")
val ex = intercept[SparkException] {
joinDF.collect()
}
assert(ex.getCondition == "_LEGACY_ERROR_TEMP_2249")
}
}
}

// Additional tests run in 'local-cluster' mode.
Expand Down