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


##########
catalog/catalogtest/create_table_opts.go:
##########
@@ -116,3 +119,41 @@ func testCreateTableWithSortOrder(t *testing.T, cfg 
Config) {
                assert.Equal(t, sourceName(t, Schema, want.SourceIDs), 
sourceName(t, tbl.Schema(), got.SourceIDs))
        }
 }
+
+// testCreateTableWithLocation asserts that a table created with an explicit
+// location reports it on a fresh load and writes its metadata under it. The
+// suite does not know the catalog's warehouse, so the location is a sibling
+// of a default table location, which the catalog's storage already accepts.
+func testCreateTableWithLocation(t *testing.T, cfg Config) {
+       ctx := context.Background()
+       cat := cfg.NewCatalog(t)
+
+       defaultIdent, defaultTbl := createTable(t, cat)
+       loc := strings.TrimSuffix(defaultTbl.Location(), "/") + "_custom_" + 
strings.ReplaceAll(uuid.NewString(), "-", "_")
+
+       ident := table.Identifier{defaultIdent[0], "tbl_with_location"}
+       _, err := cat.CreateTable(ctx, ident, Schema, catalog.WithLocation(loc))

Review Comment:
   Fixed in b45c5d8bf9



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