cloud-fan commented on code in PR #41867:
URL: https://github.com/apache/spark/pull/41867#discussion_r1256446496
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/BatchEvalPythonUDTFExec.scala:
##########
@@ -187,14 +108,27 @@ class PythonUDTFRunner(
new PythonUDFWriterThread(env, worker, inputIterator, partitionIndex,
context) {
protected override def writeCommand(dataOut: DataOutputStream): Unit = {
- dataOut.writeInt(argOffsets.length)
- argOffsets.foreach { offset =>
- dataOut.writeInt(offset)
- }
- dataOut.writeInt(udtf.func.command.length)
- dataOut.write(udtf.func.command.toArray)
- writeUTF(udtf.elementSchema.json, dataOut)
+ PythonUDTFRunner.writeUDTF(dataOut, udtf, argOffsets)
}
}
}
}
+
+object PythonUDTFRunner {
+
+ def writeUTF(str: String, dataOut: DataOutputStream): Unit = {
Review Comment:
```suggestion
def writeUDTF(str: String, dataOut: DataOutputStream): Unit = {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]