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

Use sql_conf util in PySpark tests where possible

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment