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

Importing all of pyspark.sql.functions should bring PandasUDFType in as well

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • PySpark
    • None

    Description

       

      >>> foo = pandas_udf(lambda x: x, 'v int', PandasUDFType.GROUPED_MAP)
      Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
      NameError: name 'PandasUDFType' is not defined
       
      

      When explicitly imported it works fine:

       
      >>> from pyspark.sql.functions import PandasUDFType
      >>> foo = pandas_udf(lambda x: x, 'v int', PandasUDFType.GROUPED_MAP)
      

       

      We just need to make sure it's included in _all_/

      Attachments

        Activity

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

          People

            kevinyu98 kevin yu
            holden Holden Karau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment