Details
Description
Currently hive passes the following info to HiveSemanticAnalyzerHook through HiveSemanticAnalyzerHookContext (see https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L553). But the operation type (HiveOperation) is also needed in some cases, e.g., when integrating with Sentry.
hookCtx.setConf(conf); hookCtx.setUserName(userName); hookCtx.setIpAddress(SessionState.get().getUserIpAddress()); hookCtx.setCommand(command);