lliangyu-lin commented on code in PR #395:
URL: https://github.com/apache/iceberg-go/pull/395#discussion_r2054570747


##########
catalog/glue/glue.go:
##########
@@ -330,6 +331,53 @@ func (c *Catalog) RegisterTable(ctx context.Context, 
identifier table.Identifier
        return c.LoadTable(ctx, identifier, nil)
 }
 
+// SetTableProperties updates the properties of an existing Iceberg table.
+// The properties will be merged with existing properties. If a property key 
already exists,
+// its value will be overwritten.
+func (c *Catalog) SetTableProperties(ctx context.Context, identifier 
table.Identifier, props iceberg.Properties) error {
+       database, tableName, err := identifierToGlueTable(identifier)
+       if err != nil {
+               return err
+       }
+
+       existingTable, err := c.getTable(ctx, database, tableName)
+       if err != nil {
+               return err
+       }
+
+       updatedParameters := map[string]string{}
+       for k, v := range existingTable.Parameters {
+               updatedParameters[k] = v
+       }
+       for k, v := range props {
+               updatedParameters[k] = v
+       }

Review Comment:
   Thank you for working on this! I have a general question on how does 
unsetting the property works? Seems like right now the logic is only adding new 
properties or overriding existing properties.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to