dttung2905 commented on code in PR #395: URL: https://github.com/apache/iceberg-go/pull/395#discussion_r2054848344
########## 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: Hi @lliangyu-lin, thank you for the quick review. its a very good question and you are right, the current `SetTableProperties` method only does the `set` or overwrite existing key and not the `unsett`. I was thinking about having another `UnSetTableProperties` for such purposes. Wdyt? -- 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