nytai opened a new pull request, #43809: URL: https://github.com/apache/superset/pull/43809
### SUMMARY sqlglot's MySQL-derived SHOW parser (inherited as-is by StarRocks) resolves the schema in `SHOW TABLES/DATABASES FROM|IN <schema>` with `_parse_id_var()`, which only consumes a single identifier. StarRocks also supports a catalog-qualified schema for external catalogs, e.g. `SHOW TABLES IN catalog.schema`, which fails to parse: sqlglot consumes the first identifier as the schema and rejects the dangling `.schema` as an unexpected token. Adds a StarRocks parser override that resolves the schema via `_parse_table_parts(is_db_reference=True)` instead, so both a plain schema and a dotted `catalog.schema` parse correctly. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF ### TESTING INSTRUCTIONS Added unit tests in `tests/unit_tests/sql/parse_tests.py` covering `SHOW TABLES/DATABASES` with `IN`/`FROM` and plain/catalog-qualified schemas, plus a guard that `SHOW BINLOG EVENTS IN 'log_name'` still parses correctly. ### 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 - [ ] 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]
