morningman commented on code in PR #46290: URL: https://github.com/apache/doris/pull/46290#discussion_r1901577297
########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveExternalTable.java: ########## @@ -0,0 +1,145 @@ +// 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.datasource.hive; + +import org.apache.doris.catalog.Column; +import org.apache.doris.catalog.Env; +import org.apache.doris.catalog.MTMV; +import org.apache.doris.catalog.PartitionItem; +import org.apache.doris.catalog.PartitionType; +import org.apache.doris.common.AnalysisException; +import org.apache.doris.common.DdlException; +import org.apache.doris.datasource.mvcc.MvccSnapshot; +import org.apache.doris.mtmv.MTMVBaseTableIf; +import org.apache.doris.mtmv.MTMVMaxTimestampSnapshot; +import org.apache.doris.mtmv.MTMVRefreshContext; +import org.apache.doris.mtmv.MTMVRelatedTableIf; +import org.apache.doris.mtmv.MTMVSnapshotIf; +import org.apache.doris.mtmv.MTMVTimestampSnapshot; + +import com.google.common.collect.Lists; +import org.apache.commons.collections.CollectionUtils; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + +public class HiveExternalTable extends HMSExternalTable implements MTMVRelatedTableIf, MTMVBaseTableIf { Review Comment: There maybe gson compatibility problem, you can search `HMSExternalTable.class` in GsonUtils.java. Better test it. 1. create a old verson doris cluster, create catalog with `"use_meta_cache" = "true"`. 2. create hive catalog. 3. upgrade doris to new version, to see if it is ok. ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalDatabase.java: ########## @@ -42,8 +43,13 @@ public HMSExternalDatabase(ExternalCatalog extCatalog, long id, String name, Str public HMSExternalTable buildTableInternal(String remoteTableName, String localTableName, long tblId, ExternalCatalog catalog, ExternalDatabase db) { - return new HMSExternalTable(tblId, localTableName, remoteTableName, (HMSExternalCatalog) extCatalog, - (HMSExternalDatabase) db); + HMSExternalTable hmsExternalTable = new HMSExternalTable(tblId, localTableName, remoteTableName, Review Comment: This should be in `else`? -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org