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

Python UDF in higher order functions should not throw internal error

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • PySpark
    • None

    Description

      from pyspark.sql.functions import transform, udf, col, array
      spark.range(1).select(transform(array("id"), lambda x: udf(lambda y: y)(x))).collect()
      

      throws an internal error:

      	at org.apache.spark.SparkException$.internalError(SparkException.scala:88)
      	at org.apache.spark.SparkException$.internalError(SparkException.scala:92)
      	at org.apache.spark.sql.errors.QueryExecutionErrors$.cannotEvaluateExpressionError(QueryExecutionErrors.scala:73)
      	at org.apache.spark.sql.catalyst.expressions.Unevaluable.eval(Expression.scala:507)
      	at org.apache.spark.sql.catalyst.expressions.Unevaluable.eval$(Expression.scala:506)
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: