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 09:50:53 UTC

[GitHub] [doris] SaintBacchus opened a new pull request, #11338: [feature-wip][multi-catalog][WIP]Support use catalog.db and show databases from catalog stmt

SaintBacchus opened a new pull request, #11338:
URL: https://github.com/apache/doris/pull/11338

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   Support use catalog.db and show databases from catalog stmt. These stmts are supported in presto.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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


[GitHub] [doris] SaintBacchus commented on pull request #11338: [feature-wip](multi-catalog)Support use catalog.db and show databases from catalog stmt

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on PR #11338:
URL: https://github.com/apache/doris/pull/11338#issuecomment-1205183320

   @morningman this pr is ready for reviewing


-- 
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


[GitHub] [doris] SaintBacchus commented on a diff in pull request #11338: [feature-wip][multi-catalog][WIP]Support use catalog.db and show databases from catalog stmt

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on code in PR #11338:
URL: https://github.com/apache/doris/pull/11338#discussion_r933104103


##########
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:
   Still in working



-- 
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


[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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [doris] morningman merged pull request #11338: [feature-wip](multi-catalog)Support use catalog.db and show databases from catalog stmt

Posted by GitBox <gi...@apache.org>.
morningman merged PR #11338:
URL: https://github.com/apache/doris/pull/11338


-- 
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


[GitHub] [doris] SaintBacchus commented on a diff in pull request #11338: [feature-wip][multi-catalog][WIP]Support use catalog.db and show databases from catalog stmt

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on code in PR #11338:
URL: https://github.com/apache/doris/pull/11338#discussion_r933103466


##########
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:
   yes, I'm modifying.



-- 
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


[GitHub] [doris] SaintBacchus commented on pull request #11338: [feature-wip](multi-catalog)Support use catalog.db and show databases from catalog stmt

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on PR #11338:
URL: https://github.com/apache/doris/pull/11338#issuecomment-1207148476

   Already add the doc for `use db` and `show db`


-- 
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