org.apache.hadoop.hive.ql.parse
Class AbstractSemanticAnalyzerHook

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.AbstractSemanticAnalyzerHook
All Implemented Interfaces:
Hook, HiveSemanticAnalyzerHook

public abstract class AbstractSemanticAnalyzerHook
extends Object
implements HiveSemanticAnalyzerHook


Constructor Summary
AbstractSemanticAnalyzerHook()
           
 
Method Summary
 void postAnalyze(HiveSemanticAnalyzerHookContext context, List<Task<? extends Serializable>> rootTasks)
          Invoked after Hive performs its own semantic analysis on a statement (including optimization).
 ASTNode preAnalyze(HiveSemanticAnalyzerHookContext context, ASTNode ast)
          Invoked before Hive performs its own semantic analysis on a statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSemanticAnalyzerHook

public AbstractSemanticAnalyzerHook()
Method Detail

preAnalyze

public ASTNode preAnalyze(HiveSemanticAnalyzerHookContext context,
                          ASTNode ast)
                   throws SemanticException
Description copied from interface: HiveSemanticAnalyzerHook
Invoked before Hive performs its own semantic analysis on a statement. The implementation may inspect the statement AST and prevent its execution by throwing a SemanticException. Optionally, it may also augment/rewrite the AST, but must produce a form equivalent to one which could have been returned directly from Hive's own parser.

Specified by:
preAnalyze in interface HiveSemanticAnalyzerHook
Parameters:
context - context information for semantic analysis
ast - AST being analyzed and optionally rewritten
Returns:
replacement AST (typically the same as the original AST unless the entire tree had to be replaced; must not be null)
Throws:
SemanticException

postAnalyze

public void postAnalyze(HiveSemanticAnalyzerHookContext context,
                        List<Task<? extends Serializable>> rootTasks)
                 throws SemanticException
Description copied from interface: HiveSemanticAnalyzerHook
Invoked after Hive performs its own semantic analysis on a statement (including optimization). Hive calls postAnalyze on the same hook object as preAnalyze, so the hook can maintain state across the calls.

Specified by:
postAnalyze in interface HiveSemanticAnalyzerHook
Parameters:
context - context information for semantic analysis
rootTasks - root tasks produced by semantic analysis; the hook is free to modify this list or its contents
Throws:
SemanticException


Copyright © 2014 The Apache Software Foundation. All rights reserved.