zeroshade commented on code in PR #1650:
URL: https://github.com/apache/iceberg-go/pull/1650#discussion_r3732154343


##########
cmd/iceberg/args_test.go:
##########
@@ -382,6 +384,33 @@ func TestCLIExplicitMissingConfigFailsBeforeCatalogInit(t 
*testing.T) {
        assert.Contains(t, string(out), path)

Review Comment:
   Non-blocking: consider making this table-driven across mixed-case `REST`, 
`Glue`, `HIVE`, and `Hadoop`, with a negative `RESTX` case. That would cover 
every existing switch branch and show that normalization does not make unknown 
types acceptable.



##########
cmd/iceberg/main.go:
##########
@@ -358,7 +358,7 @@ func initCatalog(ctx context.Context, args Args) 
catalog.Catalog {
                err error
        )
 
-       switch catalog.Type(args.Catalog) {
+       switch catalog.Type(strings.ToLower(args.Catalog)) {

Review Comment:
   Non-blocking: consider normalizing the catalog type in `catalog.Load` as 
well. `catalog/registry.go:150-161` currently passes the configured type to an 
exact-match registry lookup, so the library API remains case-sensitive while 
the CLI is now lenient. Applying `strings.ToLower` there would make the two 
entry points consistent.



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