LuciferYang opened a new issue, #70463: URL: https://github.com/apache/doris/issues/70463
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version master (9fb3e3a2a13) ### What's Wrong? These statements accept a qualified database in the grammar, `(FROM | IN) database=multipartIdentifier`, but their Nereids visitors in `LogicalPlanBuilder` don't resolve it: - `SHOW DELETE`, `SHOW ENCRYPTKEYS`, `SHOW FILE` and `SHOW DYNAMIC PARTITION TABLES` keep only the first part. `SHOW DELETE FROM internal.db1` looks up a database named `internal`, so it fails with `Unknown database 'internal'`, or lists that database's rows if one exists. `FROM a.b.c` is read as `a` without an error. - `SHOW COLUMNS FROM t1 FROM internal.db1` uses the raw text `internal.db1` as the database name and fails with `Unknown database 'internal.db1'`. ### What You Expected? `FROM internal.db1` resolves to `db1` in the internal catalog, as it does for `SHOW TABLES FROM internal.db1`. The internal-only commands reject any other catalog, SHOW COLUMNS accepts any catalog, and names with more than two parts are rejected. ### How to Reproduce? ```sql CREATE DATABASE db1; CREATE TABLE db1.t1 (k INT, v INT) DISTRIBUTED BY HASH(k) BUCKETS 1 PROPERTIES ('replication_num' = '1'); SHOW COLUMNS FROM t1 FROM internal.db1; -- Unknown database 'internal.db1' SHOW DELETE FROM internal.db1; -- Unknown database 'internal' ``` ### Anything Else? Other visitors, such as `visitShowFunctions` and `visitShowConvertLsc`, already handle the two-part form. ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
