badalprasadsingh opened a new pull request, #1211: URL: https://github.com/apache/iceberg-go/pull/1211
## Problem Fixes #1210 The SQL Catalog registrar in `catalog/sql/sql.go` ignores the catalog name passed to `catalog.Load(ctx, name, props)`, and threads it through `Properties.Get(name, "sql")`. ## Solution Pass `c.name` as the name the to catalog.Load, so a catalog.Load(ctx, "olake_iceberg", …) shares the same catalog name row space as Spark or any other caller. ```go NewCatalog(name, sqldb, SupportedDialect(dialect), p) ``` This change aligns with: - what we have for [REST](https://github.com/apache/iceberg-go/blob/0c5552bfd34937e07bcb22f9bf9a3b5c4e33b27c/catalog/rest/rest.go#L103-L111) and [Hadoop](https://github.com/apache/iceberg-go/blob/0c5552bfd34937e07bcb22f9bf9a3b5c4e33b27c/catalog/hadoop/hadoop.go#L41-L49) as the catalog. - Iceberg-java's [JdbcCatalog.initialize](https://github.com/apache/iceberg/blob/6ee0a3be308037e280ff17172a5bbd67a2a4131a/core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java#L130-L132) stores the caller-supplied name. ## Files Changed | File | Description | |------|-------------| | `catalog/sql/sql.go` | Bug fix | | `catalog/sql/sql_test.go` | Unit test for it | ## Testing - Ingested data into the SQL catalog - Queried through Spark `3.5.5` ## Compatibility Note Existing iceberg-go deployments may have metadata stored under catalog_name='sql'; after this fix, users may need to load the catalog as "sql" or migrate existing rows to the desired catalog name. -- 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]
