laskoviymishka commented on code in PR #2740:
URL: https://github.com/apache/iceberg-go/pull/2740#discussion_r4727628352


##########
catalog/internal/utils.go:
##########
@@ -392,6 +392,10 @@ func GetUpdatedPropsAndUpdateSummary(currentProps 
iceberg.Properties, removals [
                updated      = make([]string, 0, len(updates))
        )
 
+       if updatedProps == nil && len(updates) > 0 {

Review Comment:
   Could the PR description call this guard defensive? Every caller already 
builds a non-nil map 
([glue](https://github.com/apache/iceberg-go/blob/759ef8882db4136a219ceb958aa9a0bf25388fa4/catalog/glue/glue.go#L963-L966),
 
[hive](https://github.com/apache/iceberg-go/blob/759ef8882db4136a219ceb958aa9a0bf25388fa4/catalog/hive/hive.go#L947-L950),
 
[sql](https://github.com/apache/iceberg-go/blob/759ef8882db4136a219ceb958aa9a0bf25388fa4/catalog/sql/sql.go#L1767-L1770),
 dynamodb's `properties()`), so a namespace with no properties never hit the 
panic. Only direct calls to the helper could.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to