badalprasadsingh commented on code in PR #1211:
URL: https://github.com/apache/iceberg-go/pull/1211#discussion_r3428055008
##########
catalog/sql/sql_test.go:
##########
@@ -322,6 +322,28 @@ func (s *SqliteCatalogTestSuite)
TestCreationAllTablesExist() {
s.confirmTablesExist(sqldb)
}
+func (s *SqliteCatalogTestSuite) TestCatalogNameMatchesLoaderArg() {
+ const catalogName = "test_catalog"
+ cat, err := catalog.Load(context.Background(), catalogName,
iceberg.Properties{
+ "uri": ":memory:",
+ sqlcat.DriverKey: sqliteshim.ShimName,
+ sqlcat.DialectKey: string(sqlcat.SQLite),
+ "type": "sql",
+ "warehouse": "file://" + s.warehouse,
+ })
+ s.Require().NoError(err)
+ sqlCat := cat.(*sqlcat.Catalog)
+ s.Equal(catalogName, sqlCat.Name(), "SQL catalog must surface the name
passed to catalog.Load")
+
+ ctx := context.Background()
+ ns := table.Identifier{"test"}
+ s.Require().NoError(sqlCat.CreateNamespace(ctx, ns,
iceberg.Properties{"created_by": "iceberg-go"}))
+
+ got, err := sqlCat.ListNamespaces(ctx, table.Identifier{})
Review Comment:
Done. Folded both in.
--
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]