Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-54137 Prepare Apache Spark 4.2.0
  3. SPARK-54599

Make PythonException a SparkThrowable and handle it in Python

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      For now, if Python workers raise an exception, it will be passed to JVM and became a RuntimeError - Python driver has to capture it and check the message to reconstruct the exception.

      There are a few issues with it - first of all, we have special code to deal with such a common issue. Then there's no way to associate a SQLSTATE with the exception.

      By making PythonException a normal SparkThrowable, we can use the shared code path for it, which supports SQLSTATE natively.

      We can also polish the exception message a bit.

      Attachments

        Activity

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

          People

            gaogaotiantian Tian Gao
            gaogaotiantian Tian Gao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment