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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.PTFTranslator

public class PTFTranslator
extends Object


Nested Class Summary
static class PTFTranslator.LeadLagInfo
           
static class PTFTranslator.ValidateNoLeadLag
           
 
Constructor Summary
PTFTranslator()
           
 
Method Summary
protected static ArrayList<PTFInvocationSpec.OrderExpression> addPartitionExpressionsToOrderList(ArrayList<PTFInvocationSpec.PartitionExpression> partCols, ArrayList<PTFInvocationSpec.OrderExpression> orderCols)
           
 PTFDesc.PTFExpressionDef buildExpressionDef(PTFDesc.ShapeDetails inpShape, ASTNode arg)
           
protected static RowResolver buildRowResolverForNoop(String tabAlias, StructObjectInspector rowObjectInspector, RowResolver inputRowResolver)
           
protected static RowResolver buildRowResolverForPTF(String tbFnName, String tabAlias, StructObjectInspector rowObjectInspector, ArrayList<String> outputColNames, RowResolver inputRR)
           
protected  RowResolver buildRowResolverForWindowing(PTFDesc.WindowTableFunctionDef def)
           
static ArrayList<PTFInvocationSpec> componentize(PTFInvocationSpec ptfInvocation)
           
protected static SerDe createLazyBinarySerDe(Configuration cfg, StructObjectInspector oi, Map<String,String> serdePropsMap)
           
static ASTNode getASTNode(ColumnInfo cInfo, RowResolver rr)
           
static StructObjectInspector getStandardStructOI(RowResolver rr)
          For each column on the input RR, construct a StructField for it OI is constructed using the list of input column names and their corresponding OIs.
 PTFDesc translate(PTFInvocationSpec qSpec, SemanticAnalyzer semAly, HiveConf hCfg, RowResolver inputRR, org.apache.hadoop.hive.ql.parse.UnparseTranslator unparseT)
           
 PTFDesc translate(WindowingSpec wdwSpec, SemanticAnalyzer semAly, HiveConf hCfg, RowResolver inputRR, org.apache.hadoop.hive.ql.parse.UnparseTranslator unparseT)
           
protected static void validateComparable(ObjectInspector OI, String errMsg)
           
static void validateNoLeadLagInValueBoundarySpec(ASTNode node)
           
static void visit(Object t, org.antlr.runtime.tree.TreeWizard.ContextVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTFTranslator

public PTFTranslator()
Method Detail

translate

public PTFDesc translate(PTFInvocationSpec qSpec,
                         SemanticAnalyzer semAly,
                         HiveConf hCfg,
                         RowResolver inputRR,
                         org.apache.hadoop.hive.ql.parse.UnparseTranslator unparseT)
                  throws SemanticException
Throws:
SemanticException

translate

public PTFDesc translate(WindowingSpec wdwSpec,
                         SemanticAnalyzer semAly,
                         HiveConf hCfg,
                         RowResolver inputRR,
                         org.apache.hadoop.hive.ql.parse.UnparseTranslator unparseT)
                  throws SemanticException
Throws:
SemanticException

addPartitionExpressionsToOrderList

protected static ArrayList<PTFInvocationSpec.OrderExpression> addPartitionExpressionsToOrderList(ArrayList<PTFInvocationSpec.PartitionExpression> partCols,
                                                                                                 ArrayList<PTFInvocationSpec.OrderExpression> orderCols)
                                                                                          throws SemanticException
Throws:
SemanticException

buildExpressionDef

public PTFDesc.PTFExpressionDef buildExpressionDef(PTFDesc.ShapeDetails inpShape,
                                                   ASTNode arg)
                                            throws HiveException
Throws:
HiveException

createLazyBinarySerDe

protected static SerDe createLazyBinarySerDe(Configuration cfg,
                                             StructObjectInspector oi,
                                             Map<String,String> serdePropsMap)
                                      throws SerDeException
Throws:
SerDeException

getStandardStructOI

public static StructObjectInspector getStandardStructOI(RowResolver rr)
For each column on the input RR, construct a StructField for it OI is constructed using the list of input column names and their corresponding OIs.

Parameters:
rr -
Returns:

validateComparable

protected static void validateComparable(ObjectInspector OI,
                                         String errMsg)
                                  throws SemanticException
Throws:
SemanticException

buildRowResolverForPTF

protected static RowResolver buildRowResolverForPTF(String tbFnName,
                                                    String tabAlias,
                                                    StructObjectInspector rowObjectInspector,
                                                    ArrayList<String> outputColNames,
                                                    RowResolver inputRR)
                                             throws SemanticException
Throws:
SemanticException

buildRowResolverForWindowing

protected RowResolver buildRowResolverForWindowing(PTFDesc.WindowTableFunctionDef def)
                                            throws SemanticException
Throws:
SemanticException

buildRowResolverForNoop

protected static RowResolver buildRowResolverForNoop(String tabAlias,
                                                     StructObjectInspector rowObjectInspector,
                                                     RowResolver inputRowResolver)
                                              throws SemanticException
Throws:
SemanticException

getASTNode

public static ASTNode getASTNode(ColumnInfo cInfo,
                                 RowResolver rr)
                          throws SemanticException
Throws:
SemanticException

visit

public static void visit(Object t,
                         org.antlr.runtime.tree.TreeWizard.ContextVisitor visitor)

componentize

public static ArrayList<PTFInvocationSpec> componentize(PTFInvocationSpec ptfInvocation)
                                                 throws SemanticException
Throws:
SemanticException

validateNoLeadLagInValueBoundarySpec

public static void validateNoLeadLagInValueBoundarySpec(ASTNode node)
                                                 throws SemanticException
Throws:
SemanticException


Copyright © 2012 The Apache Software Foundation