This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7c539575c7 [refactor](hudi) remove hudi external table (#19908)
7c539575c7 is described below
commit 7c539575c747b7dea440f19625baa4421fb70a9e
Author: Mingyu Chen <[email protected]>
AuthorDate: Mon May 22 09:02:34 2023 +0800
[refactor](hudi) remove hudi external table (#19908)
Hudi external table is deprecated since 1.2.
We should remove it now.
Recommend to use "multi-catalog" feature to connect to Hudi.
User can not create Hudi external table.
When restarting FE, all hudi external table will still be replayed but can
not be read. And when doing checkpoint, all these tables will be discarded.
---
.../java/org/apache/doris/analysis/Analyzer.java | 7 -
.../java/org/apache/doris/catalog/Database.java | 15 ++
.../main/java/org/apache/doris/catalog/Env.java | 10 --
.../java/org/apache/doris/catalog/TableIf.java | 2 +-
.../apache/doris/datasource/InternalCatalog.java | 56 +------
.../apache/doris/external/hudi/HudiProperty.java | 29 ----
.../org/apache/doris/external/hudi/HudiTable.java | 33 ++--
.../org/apache/doris/external/hudi/HudiUtils.java | 179 ---------------------
.../apache/doris/planner/SingleNodePlanner.java | 5 +-
9 files changed, 27 insertions(+), 309 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
index 0eb812a1e9..6549282dab 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
@@ -41,8 +41,6 @@ import org.apache.doris.common.IdGenerator;
import org.apache.doris.common.Pair;
import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.common.util.VectorizedUtil;
-import org.apache.doris.external.hudi.HudiTable;
-import org.apache.doris.external.hudi.HudiUtils;
import org.apache.doris.planner.PlanNode;
import org.apache.doris.planner.RuntimeFilter;
import org.apache.doris.qe.ConnectContext;
@@ -813,11 +811,6 @@ public class Analyzer {
}
}
- if (table.getType() == TableType.HUDI &&
table.getFullSchema().isEmpty()) {
- // resolve hudi table's schema when table schema is empty from
doris meta
- table = HudiUtils.resolveHudiTable((HudiTable) table);
- }
-
// Now hms table only support a bit of table kinds in the whole hive
system.
// So Add this strong checker here to avoid some undefine behaviour in
doris.
if (table.getType() == TableType.HMS_EXTERNAL_TABLE) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
index 794570ffaf..39a1789710 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
@@ -46,8 +46,10 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
@@ -555,6 +557,7 @@ public class Database extends MetaObject implements
Writable, DatabaseIf<Table>
out.writeLong(id);
Text.writeString(out, fullQualifiedName);
// write tables
+ discardHudiTable();
int numTables = nameToTable.size();
out.writeInt(numTables);
for (Map.Entry<String, Table> entry : nameToTable.entrySet()) {
@@ -576,6 +579,18 @@ public class Database extends MetaObject implements
Writable, DatabaseIf<Table>
dbProperties.write(out);
}
+ private void discardHudiTable() {
+ Iterator<Entry<String, Table>> iterator =
nameToTable.entrySet().iterator();
+ while (iterator.hasNext()) {
+ Map.Entry<String, Table> entry = iterator.next();
+ if (entry.getValue().getType() == TableType.HUDI) {
+ LOG.warn("hudi table is deprecated, discard it. table name:
{}", entry.getKey());
+ iterator.remove();
+ idToTable.remove(entry.getValue().getId());
+ }
+ }
+ }
+
@Override
public void readFields(DataInput in) throws IOException {
super.readFields(in);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index 026082db93..a0b5f556f8 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -134,7 +134,6 @@ import org.apache.doris.deploy.impl.AmbariDeployManager;
import org.apache.doris.deploy.impl.K8sDeployManager;
import org.apache.doris.deploy.impl.LocalFileDeployManager;
import org.apache.doris.external.elasticsearch.EsRepository;
-import org.apache.doris.external.hudi.HudiTable;
import org.apache.doris.external.iceberg.IcebergTableCreationRecordMgr;
import org.apache.doris.ha.BDBHA;
import org.apache.doris.ha.FrontendNodeType;
@@ -3162,15 +3161,6 @@ public class Env {
sb.append("\"iceberg.table\" =
\"").append(icebergTable.getIcebergTbl()).append("\",\n");
sb.append(new PrintableMap<>(icebergTable.getIcebergProperties(),
" = ", true, true, false).toString());
sb.append("\n)");
- } else if (table.getType() == TableType.HUDI) {
- HudiTable hudiTable = (HudiTable) table;
-
- addTableComment(hudiTable, sb);
-
- // properties
- sb.append("\nPROPERTIES (\n");
- sb.append(new PrintableMap<>(hudiTable.getTableProperties(), " =
", true, true, false).toString());
- sb.append("\n)");
} else if (table.getType() == TableType.JDBC) {
JdbcTable jdbcTable = (JdbcTable) table;
addTableComment(jdbcTable, sb);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
index de3f4e917b..23b74298d5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
@@ -132,7 +132,7 @@ public interface TableIf {
* Doris table type.
*/
enum TableType {
- MYSQL, ODBC, OLAP, SCHEMA, INLINE_VIEW, VIEW, BROKER, ELASTICSEARCH,
HIVE, ICEBERG, HUDI, JDBC,
+ MYSQL, ODBC, OLAP, SCHEMA, INLINE_VIEW, VIEW, BROKER, ELASTICSEARCH,
HIVE, ICEBERG, @Deprecated HUDI, JDBC,
TABLE_VALUED_FUNCTION, HMS_EXTERNAL_TABLE, ES_EXTERNAL_TABLE,
MATERIALIZED_VIEW, JDBC_EXTERNAL_TABLE,
ICEBERG_EXTERNAL_TABLE, TEST_EXTERNAL_TABLE,
MAX_COMPUTE_EXTERNAL_TABLE;
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index cc9e6073ac..51556d8644 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -128,9 +128,6 @@ import org.apache.doris.common.util.Util;
import org.apache.doris.datasource.hive.PooledHiveMetaStoreClient;
import org.apache.doris.datasource.property.constants.HMSProperties;
import org.apache.doris.external.elasticsearch.EsRepository;
-import org.apache.doris.external.hudi.HudiProperty;
-import org.apache.doris.external.hudi.HudiTable;
-import org.apache.doris.external.hudi.HudiUtils;
import org.apache.doris.external.iceberg.IcebergCatalogMgr;
import org.apache.doris.external.iceberg.IcebergTableCreationRecordMgr;
import org.apache.doris.mtmv.MTMVJobFactory;
@@ -1077,9 +1074,6 @@ public class InternalCatalog implements
CatalogIf<Database> {
} else if (engineName.equalsIgnoreCase("iceberg")) {
IcebergCatalogMgr.createIcebergTable(db, stmt);
return;
- } else if (engineName.equalsIgnoreCase("hudi")) {
- createHudiTable(db, stmt);
- return;
} else if (engineName.equalsIgnoreCase("jdbc")) {
createJdbcTable(db, stmt);
return;
@@ -1225,6 +1219,7 @@ public class InternalCatalog implements
CatalogIf<Database> {
}
public void replayCreateTable(String dbName, Table table) throws
MetaNotFoundException {
+
Database db = this.fullNameToDb.get(dbName);
try {
db.createTableWithLock(table, true, false);
@@ -2419,52 +2414,6 @@ public class InternalCatalog implements
CatalogIf<Database> {
LOG.info("successfully create table[{}-{}]", tableName, tableId);
}
- private void createHudiTable(Database db, CreateTableStmt stmt) throws
DdlException {
- String tableName = stmt.getTableName();
- List<Column> columns = stmt.getColumns();
- long tableId = Env.getCurrentEnv().getNextId();
- HudiTable hudiTable = new HudiTable(tableId, tableName, columns,
stmt.getProperties());
- hudiTable.setComment(stmt.getComment());
- // check hudi properties in create stmt.
- HudiUtils.validateCreateTable(hudiTable);
- // check hudi table whether exists in hive database
- HiveConf hiveConf = new HiveConf();
- hiveConf.set(HMSProperties.HIVE_METASTORE_URIS,
-
hudiTable.getTableProperties().get(HudiProperty.HUDI_HIVE_METASTORE_URIS));
- PooledHiveMetaStoreClient client = new
PooledHiveMetaStoreClient(hiveConf, 1);
- if (!client.tableExists(hudiTable.getHmsDatabaseName(),
hudiTable.getHmsTableName())) {
- throw new DdlException(
- String.format("Table [%s] dose not exist in Hive
Metastore.", hudiTable.getHmsTableIdentifer()));
- }
-
- org.apache.hadoop.hive.metastore.api.Table hiveTable = client.getTable(
- hudiTable.getHmsDatabaseName(), hudiTable.getHmsTableName());
- if (!HudiUtils.isHudiTable(hiveTable)) {
- throw new DdlException(String.format("Table [%s] is not a hudi
table.", hudiTable.getHmsTableIdentifer()));
- }
- // after support snapshot query for mor, we should remove the check.
- if (HudiUtils.isHudiRealtimeTable(hiveTable)) {
- throw new DdlException(String.format("Can not support hudi
realtime table.", hudiTable.getHmsTableName()));
- }
- // check table's schema when user specify the schema
- if (!hudiTable.getFullSchema().isEmpty()) {
- HudiUtils.validateColumns(hudiTable, hiveTable);
- }
- switch (hiveTable.getTableType()) {
- case "EXTERNAL_TABLE":
- case "MANAGED_TABLE":
- break;
- case "VIRTUAL_VIEW":
- default:
- throw new DdlException("unsupported hudi table type [" +
hiveTable.getTableType() + "].");
- }
- // check hive table if exists in doris database
- if (!db.createTableWithLock(hudiTable, false,
stmt.isSetIfNotExists()).first) {
- ErrorReport.reportDdlException(ErrorCode.ERR_TABLE_EXISTS_ERROR,
tableName);
- }
- LOG.info("successfully create table[{}-{}]", tableName, tableId);
- }
-
private void createJdbcTable(Database db, CreateTableStmt stmt) throws
DdlException {
String tableName = stmt.getTableName();
List<Column> columns = stmt.getColumns();
@@ -2874,9 +2823,6 @@ public class InternalCatalog implements
CatalogIf<Database> {
newChecksum ^= db.getId();
idToDb.put(db.getId(), db);
fullNameToDb.put(db.getFullName(), db);
- if (db.getDbState() == DbState.LINK) {
- fullNameToDb.put(db.getAttachDb(), db);
- }
Env.getCurrentGlobalTransactionMgr().addDatabaseTransactionMgr(db.getId());
}
// ATTN: this should be done after load Db, and before loadAlterJob
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiProperty.java
b/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiProperty.java
deleted file mode 100644
index b209c0e711..0000000000
--- a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiProperty.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package org.apache.doris.external.hudi;
-
-
-/**
- * Hudi property contains information to connect a remote hudi db or table.
- */
-public class HudiProperty {
- public static final String HUDI_DATABASE = "hudi.database";
- public static final String HUDI_TABLE = "hudi.table";
- public static final String HUDI_HIVE_METASTORE_URIS =
"hudi.hive.metastore.uris";
- public static final String HUDI_CATALOG_TYPE = "hudi.catalog.type";
-}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiTable.java
b/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiTable.java
index cfc491e35e..80ab48d58b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiTable.java
@@ -34,12 +34,13 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
-/**
- * External Hudi table.
- */
+@Deprecated
public class HudiTable extends Table {
private static final Logger LOG = LogManager.getLogger(HudiTable.class);
+ public static final String HUDI_DATABASE = "hudi.database";
+ public static final String HUDI_TABLE = "hudi.table";
+
// table properties of this hudi table
private Map<String, String> tableProperties = Maps.newHashMap();
// remote Hudi database name in hive metastore
@@ -62,24 +63,8 @@ public class HudiTable extends Table {
public HudiTable(long id, String tableName, List<Column> fullSchema,
Map<String, String> tableProperties) {
super(id, tableName, TableType.HUDI, fullSchema);
this.tableProperties = tableProperties;
- this.hmsDatabaseName = tableProperties.get(HudiProperty.HUDI_DATABASE);
- this.hmsTableName = tableProperties.get(HudiProperty.HUDI_TABLE);
- }
-
- public String getHmsDatabaseName() {
- return hmsDatabaseName;
- }
-
- public String getHmsTableName() {
- return hmsTableName;
- }
-
- public Map<String, String> getTableProperties() {
- return tableProperties;
- }
-
- public String getHmsTableIdentifer() {
- return String.format("%s.%s", hmsDatabaseName, hmsTableName);
+ this.hmsDatabaseName = tableProperties.get(HUDI_DATABASE);
+ this.hmsTableName = tableProperties.get(HUDI_TABLE);
}
@Override
@@ -113,9 +98,9 @@ public class HudiTable extends Table {
@Override
public TTableDescriptor toThrift() {
THudiTable thriftHudiTable = new THudiTable();
- thriftHudiTable.setDbName(getHmsDatabaseName());
- thriftHudiTable.setTableName(getHmsTableName());
- thriftHudiTable.setProperties(getTableProperties());
+ thriftHudiTable.setDbName(hmsDatabaseName);
+ thriftHudiTable.setTableName(hmsTableName);
+ thriftHudiTable.setProperties(tableProperties);
TTableDescriptor thriftTableDescriptor = new TTableDescriptor(getId(),
TTableType.BROKER_TABLE,
fullSchema.size(), 0, getName(), "");
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiUtils.java
b/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiUtils.java
deleted file mode 100644
index 757fdc2d45..0000000000
--- a/fe/fe-core/src/main/java/org/apache/doris/external/hudi/HudiUtils.java
+++ /dev/null
@@ -1,179 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package org.apache.doris.external.hudi;
-
-import org.apache.doris.catalog.Column;
-import org.apache.doris.catalog.HiveMetaStoreClientHelper;
-import org.apache.doris.common.AnalysisException;
-import org.apache.doris.common.DdlException;
-import org.apache.doris.common.ErrorCode;
-import org.apache.doris.external.hive.util.HiveUtil;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.Maps;
-import org.apache.hudi.hadoop.HoodieParquetInputFormat;
-import org.apache.hudi.hadoop.realtime.HoodieParquetRealtimeInputFormat;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * Hudi utils.
- */
-public class HudiUtils {
- private static final Logger LOG = LogManager.getLogger(HudiUtils.class);
-
- private static final String PROPERTY_MISSING_MSG =
- "Hudi table %s is null. Please add properties('%s'='xxx') when
create table";
-
- /**
- * check hudi table properties.
- */
- public static void validateCreateTable(HudiTable table) throws
DdlException {
-
- if (table.getTableProperties() == null) {
- throw new DdlException("Please set properties of hudi table, "
- + "they are: database, table and 'hive.metastore.uris'");
- }
-
- Map<String, String> copiedProps =
Maps.newHashMap(table.getTableProperties());
- String hiveDb = copiedProps.get(HudiProperty.HUDI_DATABASE);
- if (Strings.isNullOrEmpty(hiveDb)) {
- throw new DdlException(String.format(PROPERTY_MISSING_MSG,
- HudiProperty.HUDI_DATABASE, HudiProperty.HUDI_DATABASE));
- }
- copiedProps.remove(HudiProperty.HUDI_DATABASE);
-
- String hiveTable = copiedProps.get(HudiProperty.HUDI_TABLE);
- if (Strings.isNullOrEmpty(hiveTable)) {
- throw new DdlException(String.format(PROPERTY_MISSING_MSG,
- HudiProperty.HUDI_TABLE, HudiProperty.HUDI_TABLE));
- }
- copiedProps.remove(HudiProperty.HUDI_TABLE);
-
- // check hive properties
- // hive.metastore.uris
- String hiveMetastoreUris =
copiedProps.get(HudiProperty.HUDI_HIVE_METASTORE_URIS);
- if (Strings.isNullOrEmpty(hiveMetastoreUris)) {
- throw new DdlException(String.format(PROPERTY_MISSING_MSG,
- HudiProperty.HUDI_HIVE_METASTORE_URIS,
HudiProperty.HUDI_HIVE_METASTORE_URIS));
- }
- copiedProps.remove(HudiProperty.HUDI_HIVE_METASTORE_URIS);
-
- if (!copiedProps.isEmpty()) {
- throw new DdlException("Unknown table properties: " +
copiedProps.toString());
- }
- }
-
- /**
- * check a hiveTable is hudi table or not.
- *
- * @param hiveTable hive metastore table
- * @return true when hiveTable is hudi table, false when it is not
- */
- public static boolean
isHudiTable(org.apache.hadoop.hive.metastore.api.Table hiveTable) {
- String inputFormat = hiveTable.getSd().getInputFormat();
- if (HoodieParquetInputFormat.class.getName().equals(inputFormat)
- ||
HoodieParquetRealtimeInputFormat.class.getName().equals(inputFormat)) {
- return true;
- }
- return false;
- }
-
- /**
- * check whether the table is hudi realtime table.
- *
- * @param hiveTable hive metastore table
- * @return true when table is hudi table
- */
- public static boolean
isHudiRealtimeTable(org.apache.hadoop.hive.metastore.api.Table hiveTable) {
- String inputFormat = hiveTable.getSd().getInputFormat();
- if
(HoodieParquetRealtimeInputFormat.class.getName().equals(inputFormat)) {
- return true;
- }
- return false;
- }
-
- /**
- * Check if there are duplicate columns in hudi table.
- * check if columns of hudi table exist in hive table.
- *
- * @param table hudi table to be checked
- * @param hiveTable the corresponding hive table
- * @throws DdlException when hudi table's column(s) didn't exist in hive
table
- */
- public static void validateColumns(HudiTable table,
-
org.apache.hadoop.hive.metastore.api.Table hiveTable) throws DdlException {
- Set<String> hudiColumnNames = table.getFullSchema().stream()
- .map(x -> x.getName()).collect(Collectors.toSet());
-
- Set<String> hiveTableColumnNames =
- Stream.concat(hiveTable.getSd().getCols().stream(),
hiveTable.getPartitionKeys().stream())
- .map(x -> x.getName()).collect(Collectors.toSet());
- hudiColumnNames.removeAll(hiveTableColumnNames);
- if (hudiColumnNames.size() > 0) {
- throw new DdlException(String.format("Hudi table's column(s): {%s}
didn't exist in hive table. ",
- String.join(", ", hudiColumnNames)));
- }
- }
-
- /**
- * resolve hudi table from hive metaStore.
- *
- * @param table a doris hudi table
- * @return a doris hudi table which has been resolved.
- * @throws AnalysisException when remoteTable is not exist or not a hudi
table
- */
- public static HudiTable resolveHudiTable(HudiTable table) throws
AnalysisException {
- String metastoreUris =
table.getTableProperties().get(HudiProperty.HUDI_HIVE_METASTORE_URIS);
- org.apache.hadoop.hive.metastore.api.Table remoteHiveTable = null;
- try {
- remoteHiveTable = HiveMetaStoreClientHelper.getTable(
- table.getHmsDatabaseName(),
- table.getHmsTableName(),
- metastoreUris);
- } catch (DdlException e) {
- LOG.error("Failed to get table from HiveMetaStore", e);
- throw new
AnalysisException(ErrorCode.ERR_UNKNOWN_ERROR.formatErrorMsg());
- }
- if (remoteHiveTable == null) {
- throw new
AnalysisException(ErrorCode.ERR_UNKNOWN_TABLE.formatErrorMsg(table.getHmsTableName(),
- "HiveMetaStore"));
- }
- if (!HudiUtils.isHudiTable(remoteHiveTable)) {
- throw new
AnalysisException(ErrorCode.ERR_UNKNOWN_TABLE.formatErrorMsg(table.getHmsTableName(),
- "HiveMetaStore"));
- }
-
- List<Column> newSchema =
HiveUtil.transformHiveSchema(remoteHiveTable.getSd().getCols());
- HudiTable tableWithSchema = new HudiTable(table.getId(),
- table.getName(),
- newSchema,
- table.getTableProperties());
- return tableWithSchema;
- }
-
-
-
-
-}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
index c4e74c0139..60d821166a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
@@ -1994,9 +1994,6 @@ public class SingleNodePlanner {
throw new RuntimeException("Hive external table is not
supported, try to use hive catalog please");
case ICEBERG:
throw new RuntimeException("Iceberg external table is not
supported, use iceberg catalog please");
- case HUDI:
- throw new UserException(
- "Hudi table is no longer supported. Use Multi Catalog
feature to connect to Hudi");
case JDBC:
scanNode = new JdbcScanNode(ctx.getNextNodeId(),
tblRef.getDesc(), false);
break;
@@ -2037,7 +2034,7 @@ public class SingleNodePlanner {
scanNode = new TestExternalTableScanNode(ctx.getNextNodeId(),
tblRef.getDesc());
break;
default:
- break;
+ throw new UserException("Not supported table type" +
tblRef.getTable().getType());
}
if (scanNode instanceof OlapScanNode || scanNode instanceof EsScanNode
|| scanNode instanceof FileQueryScanNode) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]