org.apache.hadoop.hive.ql.parse
Class TypeCheckProcFactory.DefaultExprProcessor

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.DefaultExprProcessor
All Implemented Interfaces:
NodeProcessor
Enclosing class:
TypeCheckProcFactory

public static class TypeCheckProcFactory.DefaultExprProcessor
extends Object
implements NodeProcessor

The default processor for typechecking.


Constructor Summary
TypeCheckProcFactory.DefaultExprProcessor()
           
 
Method Summary
static exprNodeDesc getFuncExprNodeDesc(String name, exprNodeDesc... children)
          Get the exprNodeDesc
static exprNodeDesc getFuncExprNodeDesc(String udfName, List<exprNodeDesc> children)
          This function create an ExprNodeDesc for a UDF function given the children (arguments).
static String getFunctionText(ASTNode expr, boolean isFunction)
           
static boolean isRedundantConversionFunction(ASTNode expr, boolean isFunction, ArrayList<exprNodeDesc> children)
           
 Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
          generic process for all ops that don't have specific implementations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeCheckProcFactory.DefaultExprProcessor

public TypeCheckProcFactory.DefaultExprProcessor()
Method Detail

isRedundantConversionFunction

public static boolean isRedundantConversionFunction(ASTNode expr,
                                                    boolean isFunction,
                                                    ArrayList<exprNodeDesc> children)

getFunctionText

public static String getFunctionText(ASTNode expr,
                                     boolean isFunction)

getFuncExprNodeDesc

public static exprNodeDesc getFuncExprNodeDesc(String name,
                                               exprNodeDesc... children)
Get the exprNodeDesc

Parameters:
name -
children -
Returns:
The expression node descriptor
Throws:
UDFArgumentException

getFuncExprNodeDesc

public static exprNodeDesc getFuncExprNodeDesc(String udfName,
                                               List<exprNodeDesc> children)
                                        throws UDFArgumentException
This function create an ExprNodeDesc for a UDF function given the children (arguments). It will insert implicit type conversion functions if necessary.

Throws:
SemanticException
UDFArgumentException

process

public Object process(Node nd,
                      Stack<Node> stack,
                      NodeProcessorCtx procCtx,
                      Object... nodeOutputs)
               throws SemanticException
Description copied from interface: NodeProcessor
generic process for all ops that don't have specific implementations

Specified by:
process in interface NodeProcessor
Parameters:
nd - operator to process
procCtx - operator processor context
nodeOutputs - A variable argument list of outputs from other nodes in the walk
Returns:
Object to be returned by the process call
Throws:
SemanticException


Copyright © 2009 The Apache Software Foundation