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

udf type hint should allow dectorator with named returnType

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 3.1.1, 3.2.0
    • 3.1.1
    • PySpark
    • None

    Description

      At the moment annotations allow following decorated patterns:
       

      @udf
      def f(x): ...
      
      @udf("string")  # Or DataType instance
      def f(x): ...
      
      @udf(f="string")  # Awkward but technically valid
      def f(x): ...
      

      We should also support

      @udf(returnType="string")
      def f(x): ...
      

      Attachments

        Activity

          People

            pgrz Piotr Grzegorski
            zero323 Maciej Szymkiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: