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

Use sql_conf util in PySpark tests where possible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.3.1, 2.4.0
    • PySpark
    • None

    Description

      https://github.com/apache/spark/commit/d6632d185e147fcbe6724545488ad80dce20277e added an useful util

      @contextmanager
      def sql_conf(self, pairs):
          ...
      

      to allow configuration set/unset within a block:

      with self.sql_conf({"spark.blah.blah.blah", "blah"})
          # test codes
      

      It would be nicer if we use it.

      Note that there look already few places affecting tests without restoring the original value back in unittest classes.

      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: