diff --git a/env.sh b/env.sh index 7c179a0d86..efc4b105bd 100755 --- a/env.sh +++ b/env.sh @@ -25,7 +25,7 @@ fi # check OS type if [[ ! -z "$OSTYPE" ]]; then - if [[ "$OSTYPE" != "linux-gnu" ]]; then + if [[ ${OSTYPE} != "linux-gnu" ]] && [[ ${OSTYPE:0:6} != "darwin" ]]; then echo "Error: Unsupported OS type: $OSTYPE" exit 1 fi diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java index 892113ec78..ec7e281341 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java @@ -334,24 +334,48 @@ public class Table extends MetaObject implements Writable { } 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"; + case SCHEMA: + return "SYSTEM VIEW"; + case INLINE_VIEW: + case VIEW: + return "VIEW"; + case MYSQL: + case ODBC: + case BROKER: + case ELASTICSEARCH: + case HIVE: + return "EXTERNAL TABLE"; + default: + return null; } - return "BASE TABLE"; } public String getComment() {