YannByron commented on code in PR #2437:
URL: https://github.com/apache/fluss/pull/2437#discussion_r2721674869
##########
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:
There must be some table properties which can't be changed, e.g.
`table.datalake.format`, I guess. Think about this case, and update this pr.
@wuchong maybe can give some advice.
--
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]