in flink-connector-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/parse/HiveParserDDLSemanticAnalyzer.java [311:423]
public Operation convertToOperation(HiveParserASTNode ast) throws SemanticException {
Operation res = null;
switch (ast.getType()) {
case HiveASTParser.TOK_ALTERTABLE:
res = convertAlterTable(ast);
break;
case HiveASTParser.TOK_DROPTABLE:
res = convertDropTable(ast, null);
break;
case HiveASTParser.TOK_DESCTABLE:
res = convertDescribeTable(ast);
break;
case HiveASTParser.TOK_SHOWDATABASES:
res = convertShowDatabases();
break;
case HiveASTParser.TOK_SHOWTABLES:
res = convertShowTables(ast, false);
break;
case HiveASTParser.TOK_SHOWFUNCTIONS:
res = convertShowFunctions(ast);
break;
case HiveASTParser.TOK_SHOWVIEWS:
res = convertShowTables(ast, true);
break;
case HiveASTParser.TOK_DROPVIEW:
res = convertDropTable(ast, TableType.VIRTUAL_VIEW);
break;
case HiveASTParser.TOK_ALTERVIEW:
res = convertAlterView(ast);
break;
case HiveASTParser.TOK_SHOWPARTITIONS:
res = convertShowPartitions(ast);
break;
case HiveASTParser.TOK_CREATEDATABASE:
res = convertCreateDatabase(ast);
break;
case HiveASTParser.TOK_DROPDATABASE:
res = convertDropDatabase(ast);
break;
case HiveASTParser.TOK_SWITCHDATABASE:
res = convertSwitchDatabase(ast);
break;
case HiveASTParser.TOK_ALTERDATABASE_PROPERTIES:
res = convertAlterDatabaseProperties(ast);
break;
case HiveASTParser.TOK_ALTERDATABASE_OWNER:
res = convertAlterDatabaseOwner(ast);
break;
case HiveASTParser.TOK_ALTERDATABASE_LOCATION:
res = convertAlterDatabaseLocation(ast);
break;
case HiveASTParser.TOK_CREATETABLE:
res = convertCreateTable(ast);
break;
case HiveASTParser.TOK_CREATEVIEW:
res = convertCreateView(ast);
break;
case HiveASTParser.TOK_CREATEFUNCTION:
res = convertCreateFunction(ast);
break;
case HiveASTParser.TOK_DROPFUNCTION:
res = convertDropFunction(ast);
break;
case HiveASTParser.TOK_CREATEMACRO:
res = convertCreateMacro(ast);
break;
case HiveASTParser.TOK_DROPMACRO:
res = convertDropMacro(ast);
break;
case HiveASTParser.TOK_SHOW_CREATETABLE:
res = convertShowCreateTable(ast);
break;
case HiveASTParser.TOK_DESCFUNCTION:
case HiveASTParser.TOK_DESCDATABASE:
case HiveASTParser.TOK_TRUNCATETABLE:
case HiveASTParser.TOK_CREATEINDEX:
case HiveASTParser.TOK_DROPINDEX:
case HiveASTParser.TOK_SHOWLOCKS:
case HiveASTParser.TOK_SHOWDBLOCKS:
case HiveASTParser.TOK_SHOW_COMPACTIONS:
case HiveASTParser.TOK_SHOW_TRANSACTIONS:
case HiveASTParser.TOK_ABORT_TRANSACTIONS:
case HiveASTParser.TOK_MSCK:
case HiveASTParser.TOK_ALTERINDEX_REBUILD:
case HiveASTParser.TOK_ALTERINDEX_PROPERTIES:
case HiveASTParser.TOK_SHOWINDEXES:
case HiveASTParser.TOK_LOCKTABLE:
case HiveASTParser.TOK_UNLOCKTABLE:
case HiveASTParser.TOK_LOCKDB:
case HiveASTParser.TOK_UNLOCKDB:
case HiveASTParser.TOK_CREATEROLE:
case HiveASTParser.TOK_DROPROLE:
case HiveASTParser.TOK_SHOW_ROLE_GRANT:
case HiveASTParser.TOK_SHOW_ROLE_PRINCIPALS:
case HiveASTParser.TOK_SHOW_ROLES:
case HiveASTParser.TOK_GRANT_ROLE:
case HiveASTParser.TOK_REVOKE_ROLE:
case HiveASTParser.TOK_GRANT:
case HiveASTParser.TOK_SHOW_GRANT:
case HiveASTParser.TOK_REVOKE:
case HiveASTParser.TOK_SHOW_SET_ROLE:
case HiveASTParser.TOK_CACHE_METADATA:
case HiveASTParser.TOK_DROP_MATERIALIZED_VIEW:
case HiveASTParser.TOK_SHOW_CREATEDATABASE:
case HiveASTParser.TOK_SHOWCOLUMNS:
case HiveASTParser.TOK_SHOW_TABLESTATUS:
case HiveASTParser.TOK_SHOW_TBLPROPERTIES:
case HiveASTParser.TOK_SHOWCONF:
default:
handleUnsupportedOperation(ast);
}
return res;
}