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

Use sql_conf util in PySpark tests where possible

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.1, 2.4.0
    • Component/s: PySpark
    • Labels:
      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

            • Assignee:
              hyukjin.kwon Hyukjin Kwon
              Reporter:
              hyukjin.kwon Hyukjin Kwon
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: