nytai opened a new pull request, #37026: URL: https://github.com/apache/superset/pull/37026
### SUMMARY Adds comprehensive catalog support to the StarRocks database engine specification, enabling users to browse and query data across multiple catalogs (e.g., iceberg, hive, default_catalog). **Key changes:** - Add catalog support flags (`supports_catalog`, `supports_dynamic_catalog`, `supports_dynamic_schema`) - Implement `get_catalog_names()` to retrieve available catalogs via `SHOW CATALOGS` - Implement `get_default_catalog()` to identify the default catalog from the URI - Update `adjust_engine_params()` to handle `catalog.schema` URI format - Override `get_schema_names()` to query schemas using `SHOW DATABASES` - Update URI placeholder to show `catalog.db` is optional - Add comprehensive test coverage (32 passing tests) - Refactor types in starrocks.py to use union operator **Connection string format:** - `starrocks://host:port/catalog.schema` - connects to specific schema in catalog - `starrocks://host:port/catalog.` - sets catalog context for browsing schemas - `starrocks://host:port` - no catalog or schema specified ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - Backend-only change ### TESTING INSTRUCTIONS 1. Connect to a StarRocks instance with multiple catalogs (e.g., default_catalog, iceberg, hive) 2. Enable "Allow changing catalogs" in database connection settings 3. Verify that the catalog dropdown shows all available catalogs 4. Select different catalogs and verify that the schema dropdown shows schemas from the selected catalog 5. Create queries using tables from different catalogs 6. Run the test suite: `pytest tests/unit_tests/db_engine_specs/test_starrocks.py -v` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
