wuchong commented on code in PR #2437:
URL: https://github.com/apache/fluss/pull/2437#discussion_r2723809889
##########
fluss-spark/fluss-spark-ut/src/test/scala/org/apache/fluss/spark/SparkCatalogTest.scala:
##########
@@ -192,6 +193,33 @@ class SparkCatalogTest extends FlussSparkTestBase {
checkAnswer(sql("SHOW DATABASES"), Row(DEFAULT_DATABASE) :: Nil)
}
+ test("Catalog: set/remove table properties") {
+ withTable("t") {
+ sql(
+ s"CREATE TABLE $DEFAULT_DATABASE.t (id int, name string)
TBLPROPERTIES('key1' = 'value1', '${SparkConnectorOptions.BUCKET_NUMBER.key()}'
= 3)")
+ var flussTable = admin.getTableInfo(createTablePath("t")).get()
+ assertResult(
+ Map(ConfigOptions.TABLE_REPLICATION_FACTOR.key() -> "1"),
+ "check table properties")(flussTable.getProperties.toMap.asScala)
+ assert(
+ flussTable.getCustomProperties.toMap.asScala.getOrElse("key1",
"non-exists") == "value1")
+
+ sql(s"ALTER TABLE t SET TBLPROPERTIES('key1' = 'value2')")
Review Comment:
+1 for this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]