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 2021/03/17 08:09:38 UTC

[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #5520: [Enhance] Support to show more details for 'SHOW TABLES'

acelyc111 commented on a change in pull request #5520:
URL: https://github.com/apache/incubator-doris/pull/5520#discussion_r595791027



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java
##########
@@ -334,24 +334,48 @@ public Partition getPartition(String partitionName) {
     }
 
     public String getEngine() {
-        if (this instanceof OlapTable) {
-            return "Doris";
-        } else if (this instanceof OdbcTable) {
-            return "Odbc";
-        } else if (this instanceof MysqlTable) {
-            return "MySQL";
-        } else if (this instanceof SchemaTable) {
-            return "MEMORY";
-        } else {
-            return null;
+        switch (type) {
+            case MYSQL:
+                return "MySQL";
+            case ODBC:
+                return "Odbc";
+            case OLAP:
+                return "Doris";
+            case SCHEMA:
+                return "MEMORY";
+            case INLINE_VIEW:
+                return "InlineView";
+            case VIEW:
+                return "View";
+            case BROKER:
+                return "Broker";
+            case ELASTICSEARCH:
+                return "ElasticSearch";
+            case HIVE:
+                return "Hive";
+            default:
+                return null;
         }
     }
 
     public String getMysqlType() {
-        if (this instanceof View) {
-            return "VIEW";
+        switch (type) {
+            case OLAP:
+                return "BASE TABLE";

Review comment:
       MySQL has rule of "BASE TABLE for a table, VIEW for a view, or SYSTEM VIEW for an INFORMATION_SCHEMA table". And  MySQL seems not support to create external table, so add an extral "EXTERNAL TABLE".
   https://dev.mysql.com/doc/refman/8.0/en/show-tables.html




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

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