inputType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(inputExpr.getTypeString()); if (inputType == VectorExpressionDescriptor.ArgumentType.NONE) { throw new HiveException("No vector argument type for Hive type name " + inputExpr.getTypeString());
private VectorExpression getConstantVectorExpression(Object constantValue, TypeInfo typeInfo, VectorExpressionDescriptor.Mode mode) throws HiveException { String typeName = typeInfo.getTypeName(); VectorExpressionDescriptor.ArgumentType vectorArgType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(typeName); if (vectorArgType == VectorExpressionDescriptor.ArgumentType.NONE) { throw new HiveException("No vector argument type for type name " + typeName);
VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(inputExpression.getOutputType()); switch (inputType) { case INT_FAMILY:
private VectorExpression getConstantVectorExpression(Object constantValue, TypeInfo typeInfo, Mode mode) throws HiveException { String typeName = typeInfo.getTypeName(); VectorExpressionDescriptor.ArgumentType vectorArgType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(typeName); if (vectorArgType == VectorExpressionDescriptor.ArgumentType.NONE) { throw new HiveException("No vector argument type for type name " + typeName);
inputType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(inputExpr.getTypeString()); if (inputType == VectorExpressionDescriptor.ArgumentType.NONE) { throw new HiveException("No vector argument type for Hive type name " + inputExpr.getTypeString());
static String getNormalizedName(String hiveTypeName) { VectorExpressionDescriptor.ArgumentType argType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(hiveTypeName); switch (argType) { case INT_FAMILY: return "Long"; case FLOAT_FAMILY: return "Double"; case DECIMAL: //Return the decimal type as is, it includes scale and precision. return hiveTypeName; case STRING: return "String"; case CHAR: //Return the CHAR type as is, it includes maximum length return hiveTypeName; case VARCHAR: //Return the VARCHAR type as is, it includes maximum length. return hiveTypeName; case DATE: return "Date"; case TIMESTAMP: return "Timestamp"; case INTERVAL_YEAR_MONTH: case INTERVAL_DAY_TIME: return hiveTypeName; default: return "None"; } }
static String getUndecoratedName(String hiveTypeName) { VectorExpressionDescriptor.ArgumentType argType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(hiveTypeName); switch (argType) { case INT_FAMILY: return "Long"; case FLOAT_FAMILY: return "Double"; case DECIMAL: return "Decimal"; case STRING: return "String"; case CHAR: return "Char"; case VARCHAR: return "VarChar"; case DATE: return "Date"; case TIMESTAMP: return "Timestamp"; case INTERVAL_YEAR_MONTH: case INTERVAL_DAY_TIME: return hiveTypeName; default: return "None"; } }
public static String getVectorColumnSimpleName(String hiveTypeName) { ArgumentType argType = fromHiveTypeName(hiveTypeName); return getVectorColumnSimpleName(argType); } }
static String getUndecoratedName(String hiveTypeName) throws HiveException { VectorExpressionDescriptor.ArgumentType argType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(hiveTypeName); switch (argType) { case INT_FAMILY: return "Long"; case FLOAT_FAMILY: return "Double"; case DECIMAL: return "Decimal"; case STRING: return "String"; case CHAR: return "Char"; case VARCHAR: return "VarChar"; case BINARY: return "Binary"; case DATE: return "Date"; case TIMESTAMP: return "Timestamp"; case INTERVAL_YEAR_MONTH: case INTERVAL_DAY_TIME: return hiveTypeName; default: throw new HiveException("Unexpected hive type name " + hiveTypeName); } }
static String getUndecoratedName(String hiveTypeName) throws HiveException { VectorExpressionDescriptor.ArgumentType argType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(hiveTypeName); switch (argType) { case INT_FAMILY:
String typeName = typeInfo.getTypeName(); VectorExpressionDescriptor.ArgumentType vectorArgType = VectorExpressionDescriptor.ArgumentType.fromHiveTypeName(typeName); if (vectorArgType == VectorExpressionDescriptor.ArgumentType.NONE) { throw new HiveException("No vector argument type for type name " + typeName);
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()); }
public static String getVectorColumnSimpleName(String hiveTypeName) { ArgumentType argType = fromHiveTypeName(hiveTypeName); return getVectorColumnSimpleName(argType); } }
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()); }