* @throws Exception
*/
public static DDLWork analyze(ASTNode ast, HiveConf conf, Hive db) throws Exception {
DDLSemanticAnalyzer analyzer = new DDLSemanticAnalyzer(conf, db);
SessionState.start(conf);
analyzer.analyze(ast, new Context(conf));
List<Task<? extends Serializable>> rootTasks = analyzer.getRootTasks();
return (DDLWork) inList(rootTasks).ofSize(1).get(0).getWork();
}
/**