org.apache.hadoop.hive.ql.exec.vector
Class VectorizationContext
java.lang.Object
org.apache.hadoop.hive.ql.exec.vector.VectorizationContext
public class VectorizationContext
- extends Object
Context class for vectorization execution.
Main role is to map column names to column indices and serves as a
factory class for building vectorized expressions out of descriptors.
decimalTypePattern
public static final Pattern decimalTypePattern
VectorizationContext
public VectorizationContext(Map<String,Integer> columnMap,
int initialOutputCol)
VectorizationContext
public VectorizationContext(VectorizationContext parent)
- This constructor inherits the OutputColumnManger and from
the 'parent' constructor, therefore this should be used only by operators
that don't create a new vectorized row batch. This should be used only by
operators that want to modify the columnName map without changing the row batch.
getFileKey
public String getFileKey()
setFileKey
public void setFileKey(String fileKey)
getVectorExpressions
public VectorExpression[] getVectorExpressions(List<ExprNodeDesc> exprNodes)
throws HiveException
- Throws:
HiveException
getVectorExpressions
public VectorExpression[] getVectorExpressions(List<ExprNodeDesc> exprNodes,
VectorExpressionDescriptor.Mode mode)
throws HiveException
- Throws:
HiveException
getVectorExpression
public VectorExpression getVectorExpression(ExprNodeDesc exprDesc)
throws HiveException
- Throws:
HiveException
getVectorExpression
public VectorExpression getVectorExpression(ExprNodeDesc exprDesc,
VectorExpressionDescriptor.Mode mode)
throws HiveException
- Returns a vector expression for a given expression
description.
- Parameters:
exprDesc,
- Expression descriptionmode
-
- Returns:
VectorExpression
- Throws:
HiveException
isNonVectorizedPathUDF
public static boolean isNonVectorizedPathUDF(ExprNodeGenericFuncDesc expr)
isCastToIntFamily
public static boolean isCastToIntFamily(Class<? extends UDF> udfClass)
isCastToFloatFamily
public static boolean isCastToFloatFamily(Class<? extends UDF> udfClass)
arg0Type
public static String arg0Type(ExprNodeGenericFuncDesc expr)
isCustomUDF
public static boolean isCustomUDF(ExprNodeGenericFuncDesc expr)
isStringFamily
public static boolean isStringFamily(String resultType)
isDatetimeFamily
public static boolean isDatetimeFamily(String resultType)
isTimestampFamily
public static boolean isTimestampFamily(String resultType)
isDateFamily
public static boolean isDateFamily(String resultType)
isFloatFamily
public static boolean isFloatFamily(String resultType)
isIntFamily
public static boolean isIntFamily(String resultType)
isDecimalFamily
public static boolean isDecimalFamily(String colType)
getAggregatorExpression
public VectorAggregateExpression getAggregatorExpression(AggregationDesc desc)
throws HiveException
- Throws:
HiveException
getOutputColumnTypeMap
public Map<Integer,String> getOutputColumnTypeMap()
getColumnMap
public Map<String,Integer> getColumnMap()
addToColumnMap
public void addToColumnMap(String columnName,
int outputColumn)
throws HiveException
- Throws:
HiveException
Copyright © 2014 The Apache Software Foundation. All rights reserved.