use of org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString in project hive by apache.
the class VectorExtractRow method init.
/*
* Initialize using an StructObjectInspector and a column projection list.
*/
public void init(StructObjectInspector structObjectInspector, List<Integer> projectedColumns) throws HiveException {
List<? extends StructField> fields = structObjectInspector.getAllStructFieldRefs();
final int count = fields.size();
allocateArrays(count);
for (int i = 0; i < count; i++) {
int projectionColumnNum = projectedColumns.get(i);
StructField field = fields.get(i);
ObjectInspector fieldInspector = field.getFieldObjectInspector();
TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(fieldInspector.getTypeName());
initEntry(i, projectionColumnNum, typeInfo);
}
}
use of org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString in project hive by apache.
the class VectorExtractRow method init.
/*
* Initialize using data type names.
* No projection -- the column range 0 .. types.size()-1
*/
public void init(List<String> typeNames) throws HiveException {
final int count = typeNames.size();
allocateArrays(count);
for (int i = 0; i < count; i++) {
TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(typeNames.get(i));
initEntry(i, i, typeInfo);
}
}
use of org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString in project hive by apache.
the class ConstantVectorExpression method setTypeString.
private void setTypeString(String typeString) {
this.outputType = typeString;
String typeName = VectorizationContext.mapTypeNameSynonyms(outputType);
TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(typeName);
this.type = VectorizationContext.getColumnVectorTypeFromTypeInfo(typeInfo);
}
use of org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString in project hive by apache.
the class VectorAssignRow method init.
/*
* Initialize using an StructObjectInspector.
* No projection -- the column range 0 .. fields.size()-1
*/
public void init(StructObjectInspector structObjectInspector) throws HiveException {
List<? extends StructField> fields = structObjectInspector.getAllStructFieldRefs();
final int count = fields.size();
allocateArrays(count);
for (int i = 0; i < count; i++) {
StructField field = fields.get(i);
ObjectInspector fieldInspector = field.getFieldObjectInspector();
TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(fieldInspector.getTypeName());
initTargetEntry(i, i, typeInfo);
}
}
use of org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString in project hive by apache.
the class VectorAssignRow method init.
/*
* Initialize using target data type names.
* No projection -- the column range 0 .. types.size()-1
*/
public void init(List<String> typeNames) throws HiveException {
final int count = typeNames.size();
allocateArrays(count);
for (int i = 0; i < count; i++) {
TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(typeNames.get(i));
initTargetEntry(i, i, typeInfo);
}
}
Aggregations