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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.1, 3.1.0
    • 3.0.2, 3.1.0
    • PySpark
    • 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

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: