Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-40121

Initialize projection used for Python UDF

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.3, 3.3.0, 3.2.2, 3.4.0
    • 3.1.4, 3.3.1, 3.2.3, 3.4.0
    • PySpark, SQL
    • None

    Description

      >>> from pyspark.sql.functions import udf, rand
      >>> spark.range(10).select(udf(lambda x: x)(rand())).show()
      
      java.lang.NullPointerException
      	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificMutableProjection.apply(Unknown Source)
      	at org.apache.spark.sql.execution.python.EvalPythonExec.$anonfun$doExecute$10(EvalPythonExec.scala:126)
      	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
      	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
      	at scala.collection.Iterator$GroupedIterator.takeDestructively(Iterator.scala:1161)
      	at scala.collection.Iterator$GroupedIterator.go(Iterator.scala:1176)
      	at scala.collection.Iterator$GroupedIterator.fill(Iterator.scala:1213)
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment