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) ...