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

Spark doesn't create SUCCESS file in Spark 3.3.0+ when partitionOverwriteMode is dynamic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.0
    • None
    • Spark Core
    • None

    Description

      The issue is not happening in Spark 2.x (I am using 2.4.0), but only in 3.3.0 (tested with 3.4.1 as well)

      Code to reproduce the issue

       

      scala> spark.conf.set("spark.sql.sources.partitionOverwriteMode", "dynamic") 
      scala> val DF = Seq(("test1", 123)).toDF("name", "num")
      scala> DF.write.option("path", "gs://test_bucket/table").mode("overwrite").partitionBy("num").format("orc").saveAsTable("test_schema.test_tb1") 

       

      The above code succeeds and creates external Hive table, but there is no SUCCESS file generated.

      Adding the content of the bucket after table creation

       The same code when running with spark 2.4.0 (with or without external path), generates the SUCCESS file.

      scala> DF.write.mode(SaveMode.Overwrite).partitionBy("num").format("orc").saveAsTable("test_schema.test_tb1")

       

      Attachments

        1. image-2023-08-25-13-01-42-137.png
          62 kB
          Dipayan Dev
        2. image-2023-08-20-18-46-53-342.png
          28 kB
          Dipayan Dev

        Activity

          People

            Unassigned Unassigned
            dipayandev Dipayan Dev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: