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

type check fails for `F.udf(...).asNonDeterministic()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.2
    • 3.2.0, 3.1.3, 3.3.0
    • PySpark
    • None

    Description

      The following code should type-check, but doesn't:


      import uuid

      pyspark.sql.functions as F

      my_udf = F.udf(lambda: str(uuid.uuid4())).asNondeterministic()


      In python/pyspark/sql/functions.pyi the udf signature is wrong

      Attachments

        Activity

          People

            luran.he Luran He
            luran.he Luran He
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified