Skip to content

Commit

Permalink
[SPARK-34726][SQL] Fix collectToPython timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-toth committed Mar 12, 2021
1 parent 7e0fbe0 commit b4b425e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3257,12 +3257,11 @@ class Dataset[T] private[sql](

private[sql] def collectToPython(): Array[Any] = {
EvaluatePython.registerPicklers()
withAction("collectToPython", queryExecution) { plan =>
val iter = withAction("collectToPython", queryExecution) { plan =>
val toJava: (Any) => Any = EvaluatePython.toJava(_, schema)
val iter: Iterator[Array[Byte]] = new SerDeUtil.AutoBatchedPickler(
plan.executeCollect().iterator.map(toJava))
PythonRDD.serveIterator(iter, "serve-DataFrame")
new SerDeUtil.AutoBatchedPickler(plan.executeCollect().iterator.map(toJava))
}
PythonRDD.serveIterator(iter, "serve-DataFrame")
}

private[sql] def getRowsToPython(
Expand Down

0 comments on commit b4b425e

Please sign in to comment.