Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-43797 Python User-defined Table Functions
  3. SPARK-44005

Improve error messages for regular Python UDTFs that return non-tuple values

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0, 4.0.0
    • PySpark
    • None

    Description

      Currently, if you have a UDTF like this:

      class TestUDTF:
          def eval(self, a: int):
              yield a 

      and run the UDTF, it will fail with a confusing error message like

      Unexpected tuple 1 with StructType 

      Note this works when arrow is enabled. We should improve error messages for regular UDTFs.

      Attachments

        Activity

          People

            allisonwang-db Allison Wang
            allisonwang-db Allison Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: