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


##########
table/table.go:
##########
@@ -326,7 +326,7 @@ func (t *Table) Refresh(ctx context.Context) error {
 }
 
 func validateTableUUID(identifier Identifier, expected, actual uuid.UUID) 
error {
-       if expected == uuid.Nil || actual == uuid.Nil || expected == actual {
+       if expected == (uuid.UUID{}) || actual == (uuid.UUID{}) || expected == 
actual {

Review Comment:
   Makes sense, I'll add `Nil()` with the build-tag follow-up and switch the 
call sites there.



##########
internal/uuid/uuid.go:
##########
@@ -38,3 +38,7 @@ func MustParse(s string) UUID { return uuid.MustParse(s) }
 
 // FromBytes returns the UUID held in b, which must be exactly 16 bytes long.
 func FromBytes(b []byte) (UUID, error) { return uuid.FromBytes(b) }
+
+// NewV7 returns a time-ordered (version 7) UUID. It panics if the random
+// source fails, as New does.
+func NewV7() UUID { return uuid.Must(uuid.NewV7()) }

Review Comment:
   Agreed, I'll add the depguard rule in a small follow-up.



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