First I tried implement ExecuteWithHookContext interface to get tables from hookContext.getOutputs, we can get table type by Table.getTableType method, but it turns out all tables are new created is managed table. Then I figured out in SemanticAnalyzer class, we add all tables in outputs as TableType.MANAGED_TABLE in analyzeCreateTable method. Why should we do this(see below)?

addDbAndTabToOutputs(qualifiedTabName, TableType.MANAGED_TABLE)

Hive version: 2.3.4
I also see this is not changed in master version.

Any help is much appreciated!

Reply via email to