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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.2.0, 3.1.3, 3.3.0
    • Component/s: PySpark
    • Labels:
      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

            • Assignee:
              luran.he Luran He
              Reporter:
              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