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

DataFrame.toPandas with Arrow enabled should handle exceptions properly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • PySpark
    • None

    Description

      Currently DataFrame.toPandas doesn't capture exceptions happened in Spark properly.

      >>> spark.conf.set("spark.sql.ansi.enabled", True)
      >>> spark.conf.set('spark.sql.execution.arrow.pyspark.enabled', True)
      >>> spark.sql("select 1/0").toPandas()
      ...
        An error occurred while calling o53.getResult.
      : org.apache.spark.SparkException: Exception thrown in awaitResult:
      	at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:322)
      ...
      

      Attachments

        Activity

          People

            ueshin Takuya Ueshin
            ueshin Takuya Ueshin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: