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

SparkSession.builder.getOrCreate should not show deprecation warning of SQLContext

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.1.0
    • Fix Version/s: 3.0.2, 3.1.0
    • Component/s: PySpark
    • Labels:
      None

      Description

      In PySpark shell:

      import warnings
      from pyspark.sql import SparkSession, SQLContext
      warnings.simplefilter('always', DeprecationWarning)
      spark.stop()
      SparkSession.builder.getOrCreate()
      

      shows a deprecation warning from SQLContext

      /.../spark/python/pyspark/sql/context.py:72: DeprecationWarning: Deprecated in 3.0.0. Use SparkSession.builder.getOrCreate() instead.
        DeprecationWarning)
      

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              hyukjin.kwon Hyukjin Kwon Assign to me
              Reporter:
              hyukjin.kwon Hyukjin Kwon

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment