You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/29 10:32:44 UTC
[GitHub] [doris] morningman commented on a diff in pull request #11338: [feature-wip][multi-catalog][WIP]Support use catalog.db and show databases from catalog stmt
morningman commented on code in PR #11338:
URL: https://github.com/apache/doris/pull/11338#discussion_r933099724
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UseStmt.java:
##########
@@ -35,19 +35,35 @@
*/
public class UseStmt extends StatementBase {
private static final Logger LOG = LogManager.getLogger(UseStmt.class);
+ private String catalogName;
private String database;
public UseStmt(String db) {
database = db;
}
+ public UseStmt(String catalogName, String db) {
Review Comment:
No need to modify use stmt in `sql_parser.cup`?
##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -2738,6 +2742,10 @@ show_param ::=
{:
RESULT = new ShowDbStmt(parser.wild, parser.where);
:}
+ | KW_SCHEMAS KW_FROM STRING_LITERAL:catalogName
Review Comment:
use `ident` instead of `STRING_LITERAL`. So we don't need to use `""`.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org