use of org.apache.hadoop.hive.ql.exec.vector.expressions.DynamicValueVectorExpression in project hive by apache.
the class VectorizationContext method getDynamicValueVectorExpression.
private VectorExpression getDynamicValueVectorExpression(ExprNodeDynamicValueDesc dynamicValueExpr, VectorExpressionDescriptor.Mode mode) throws HiveException {
String typeName = dynamicValueExpr.getTypeInfo().getTypeName();
VectorExpressionDescriptor.ArgumentType vectorArgType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(typeName);
if (vectorArgType == VectorExpressionDescriptor.ArgumentType.NONE) {
throw new HiveException("No vector argument type for type name " + typeName);
}
int outCol = -1;
if (mode == VectorExpressionDescriptor.Mode.PROJECTION) {
outCol = ocm.allocateOutputColumn(dynamicValueExpr.getTypeInfo());
}
return new DynamicValueVectorExpression(outCol, dynamicValueExpr.getTypeInfo(), dynamicValueExpr.getDynamicValue());
}
Aggregations