Skip to content
Closed
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 @@ -80,7 +80,8 @@ case class ScalarSubquery(
@volatile private var updated: Boolean = false

def updateResult(): Unit = {
val rows = plan.executeCollect()
// Only return the first two rows as an array to avoid Driver OOM.
val rows = plan.executeTake(2)
if (rows.length > 1) {
sys.error(s"more than one row returned by a subquery used as an expression:\n$plan")
}
Expand Down