[
https://issues.apache.org/jira/browse/FLINK-22272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320767#comment-17320767
]
wangzeyu commented on FLINK-22272:
----------------------------------
So here's my solution , in class org.apache.flink.table.catalog.CatalogManager
{code:java}
private void dropTableInternal(
ObjectIdentifier objectIdentifier, boolean ignoreIfNotExists, boolean
isDropTable) {
Predicate<CatalogBaseTable> filter =
isDropTable
? table -> table instanceof CatalogTable
: table -> table instanceof CatalogView;
// Same name temporary table or view exists.
if (filter.test(temporaryTables.get(objectIdentifier))) {
String tableOrView = isDropTable ? "table" : "view";
throw new ValidationException(
String.format(
"Temporary %s with identifier '%s' exists. "
+ "Drop it first before removing the permanent
%s.",
tableOrView, objectIdentifier, tableOrView));
}
execute(
(catalog, path) -> catalog.dropTable(path, ignoreIfNotExists),
objectIdentifier,
ignoreIfNotExists,
"DropTable");
}
{code}
> Some scenes can't drop table by hive catalog
> --------------------------------------------
>
> Key: FLINK-22272
> URL: https://issues.apache.org/jira/browse/FLINK-22272
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Hive
> Affects Versions: 1.12.1
> Reporter: wangzeyu
> Priority: Major
> Fix For: 1.12.1
>
>
> There are some scenes we can't drop table by hive catalog because of we
> execute error create table sql like "caeate table tableName". And then when
> we execute drop table sql "drop table tableName" will throw error
> "org.apache.flink.table.catalog.exceptions.CatalogException: Failed to get
> table schema from properties for generic table".
> So, i think maybe we should remove the check when we drop table by
> third-party catalog and just drop table depend on the third-party catalog.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)