ERROR 1064 (HY000): Database <name> doesn't exist location

Hi. I’m new to StarRocks so there’s plenty I’m missing here, but I do not understand why I’m getting this error if the database is being seen:

StarRocks > show databases from iceberg;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| demo                |
+--------------------+
2 rows in set (0.64 sec)

StarRocks > set catalog iceberg;
Query OK, 0 rows affected (0.00 sec)

StarRocks > use demo;
ERROR 1064 (HY000): Database demo doesn't exist location

The catalog was created like this, and the data already exists in the Iceberg REST catalog and was created in pyspark:

CREATE EXTERNAL CATALOG 'iceberg'
PROPERTIES
(
  "type"="iceberg",
  "iceberg.catalog.type"="rest",
  "iceberg.catalog.uri"="http://nessie:19120/iceberg",
  "iceberg.catalog.warehouse"="ceph",
  "aws.s3.access_key"="admin",
  "aws.s3.secret_key"="password",
  "aws.s3.endpoint"="http://ceph:8080",
  "aws.s3.enable_ssl" = "false",
  "aws.s3.enable_path_style_access"="true",
  "client.factory"="com.starrocks.connector.iceberg.IcebergAwsClientFactory"
);

@cadessi Hi, thank you for filing the issue. This has been fixed. Will be released in next minor version.

Hi @Dorian_Zheng , thanks for looking into this. It seems the problem still exists, but with StarRocks 3.1.14 I get a slightly different behavior now:

StarRocks > show databases from iceberg;
+----------+
| Database |
+----------+
| demo      |
+----------+
1 row in set (0.01 sec)

StarRocks > set catalog iceberg;
Query OK, 0 rows affected (0.01 sec)

StarRocks > use demo;
No connection. Trying to reconnect...
Connection id:    371
Current database: *** NONE ***

ERROR 1064 (HY000): Unknown database 'demo'

But if I query the demo database directly, then I get the previous error:

StarRocks > show tables from iceberg.demo;
ERROR 1064 (HY000): Database demo doesn't exist location

hi, the fixed patch will be released 3.1.15. [BugFix] don't check location when getting iceberg db with rest catalog (backport #48844) by mergify[bot] · Pull Request #48932 · StarRocks/starrocks · GitHub

I see. Sorry for the misunderstanding. Does StarRocks publish nightly snapshots that I can test in the meantime?

This is working fine now with 3.3.2. Thanks!!