Skip to content

Commit

Permalink
partition the table so there are even more directories to list in
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed Jul 26, 2024
1 parent 12b8a3d commit e732d97
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.apache.spark.sql.delta.FakeFileSystem
import org.apache.spark.sql.delta.sources.DeltaSQLConf
import org.apache.spark.sql.delta.storage.LogStoreAdaptor
import org.apache.spark.sql.delta.util.FileNames
import org.apache.spark.sql.functions.col

/////////////////////
// Base Test Suite //
Expand Down Expand Up @@ -92,7 +93,12 @@ class ExternalLogStoreSuite extends org.apache.spark.sql.delta.PublicLogStoreSui

val path = tempDir.getCanonicalPath

spark.range(100).repartition(1).write.format("delta").save(path)
spark.range(100)
.withColumn("part", col("id") % 10)
.write
.format("delta")
.partitionBy("part")
.save(path)

spark.sql(s"DELETE FROM delta.`$path`")

Expand Down

0 comments on commit e732d97

Please sign in to comment.