Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
YannByron committed Aug 9, 2024
1 parent f76bc29 commit f376535
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import scala.collection.mutable

trait PaimonTableTest extends SharedSparkSession {

val bucket: Map[String, String]
val bucket: Int

def appendPrimaryKey(primaryKeys: Seq[String], props: mutable.Map[String, String]): Unit

Expand All @@ -34,7 +34,8 @@ trait PaimonTableTest extends SharedSparkSession {
primaryKeys: Seq[String],
partitionKeys: Seq[String] = Seq.empty,
props: Map[String, String] = Map.empty): Unit = {
val newProps: mutable.Map[String, String] = mutable.Map.empty[String, String] ++ bucket ++ props
val newProps: mutable.Map[String, String] =
mutable.Map.empty[String, String] ++ Map("bucket" -> bucket.toString) ++ props
appendPrimaryKey(primaryKeys, newProps)
createTable0(tableName, columns, partitionKeys, newProps.toMap)
}
Expand Down Expand Up @@ -64,11 +65,11 @@ trait PaimonTableTest extends SharedSparkSession {
}

trait PaimonBucketedTable {
val bucket: Map[String, String] = Map("bucket" -> "3")
val bucket: Int = 3
}

trait PaimonNonBucketedTable {
val bucket: Map[String, String] = Map("bucket" -> "-1")
val bucket: Int = -1
}

trait PaimonPrimaryKeyTable {
Expand Down

0 comments on commit f376535

Please sign in to comment.