Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12057#discussion_r57977229
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 
---
    @@ -284,11 +292,22 @@ private[spark] class PythonRunner(
             }
             dataOut.flush()
             // Serialized command:
    -        dataOut.writeInt(if (rowBased) 1 else 0)
    -        dataOut.writeInt(funcs.length)
    -        funcs.foreach { f =>
    -          dataOut.writeInt(f.command.length)
    -          dataOut.write(f.command)
    +        if (isUDF) {
    +          dataOut.writeInt(1)
    +          dataOut.writeInt(funcs.length)
    +          funcs.zip(numArgs).foreach { case (fs, numArg) =>
    --- End diff --
    
    Since correctness relies on `funcs.length == numArgs.length`, do you mind 
adding a `require` at the start of the constructor to enforce this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to