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 01:44:01 UTC

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

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



##########
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:
       Is it compatible with MySQL?




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