badalprasadsingh commented on code in PR #2581:
URL: https://github.com/apache/iceberg-go/pull/2581#discussion_r4575215919


##########
catalog/sql/drop_namespace_internal_test.go:
##########
@@ -93,9 +94,12 @@ func newNamespaceRaceCatalog(t *testing.T) *Catalog {
        _, err = db.Exec("PRAGMA journal_mode=WAL")
        require.NoError(t, err)
 
+       // Encode the path: subtest temp dirs can contain URI delimiters such as
+       // '#' (duplicate subtest names get a "#01" suffix), which a raw
+       // "file://" + path would turn into a fragment.
        warehouse := filepath.Join(t.TempDir(), "warehouse")
        cat, err := NewCatalog("default", db, SQLite, iceberg.Properties{
-               "warehouse": "file://" + filepath.ToSlash(warehouse),
+               "warehouse": (&url.URL{Scheme: "file", Path: 
filepath.ToSlash(warehouse)}).String(),

Review Comment:
   nit: the same raw `"file://" +` is also at:
   1. lin251 here
   2. in rename_view_test.go line250
   3. and, in update_view_test.go line147
   
   can we add one small `fileURI` helper (something like `io/local_test.go`) 
and use it at all four -> your comment would move onto the helper then



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