throwUnsupportedHiveDataTypeError(pCat.toString()); return null;
return (int) ((secondsAndNanos >>> 32) ^ secondsAndNanos); default: throw new UnsupportedOperationException("Computation of Hive bucket hashCode is not supported for Hive primitive category: " + primitiveCategory.toString() + ".");
break; default: dataType = dataPrimitiveCategory.toString(); break;
return (int) ((secondsAndNanos >>> 32) ^ secondsAndNanos); default: throw new UnsupportedOperationException("Computation of Hive bucket hashCode is not supported for Hive primitive category: " + primitiveCategory.toString() + ".");
return (int) ((secondsAndNanos >>> 32) ^ secondsAndNanos); default: throw new UnsupportedOperationException("Computation of Hive bucket hashCode is not supported for Hive primitive category: " + primitiveCategory.toString() + ".");
return out.setBinaryValue(ByteString.copyFrom(DecimalTools.signExtend16(unscaled.toByteArray()))); default: HiveUtilities.throwUnsupportedHiveDataTypeError(((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory().toString());
return MinorType.DATEMILLI; throwUnsupportedHiveDataTypeError(primitiveTypeInfo.getPrimitiveCategory().toString()); return null;
return value; default: throw new IllegalStateException(primitiveCategory.toString());
break; default: dataType = dataPrimitiveCategory.toString(); break;
public static HiveFieldConverter create(TypeInfo typeInfo, OperatorContext context) throws IllegalAccessException, InstantiationException { switch (typeInfo.getCategory()) { case PRIMITIVE: final PrimitiveCategory pCat = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory(); if (pCat != PrimitiveCategory.DECIMAL) { Class<? extends HiveFieldConverter> clazz = primMap.get(pCat); if (clazz != null) { return clazz.newInstance(); } } else { // For decimal, based on precision return appropriate converter. DecimalTypeInfo decimalTypeInfo = (DecimalTypeInfo) typeInfo; int precision = decimalTypeInfo.precision(); int scale = decimalTypeInfo.scale(); return new Decimal(precision, scale, context); } throwUnsupportedHiveDataTypeError(pCat.toString()); break; case LIST: case MAP: case STRUCT: case UNION: default: throwUnsupportedHiveDataTypeError(typeInfo.getCategory().toString()); } return null; }
private String describeOi(String desc, ObjectInspector keyOi) { for (StructField field : ((StructObjectInspector)keyOi).getAllStructFieldRefs()) { ObjectInspector oi = field.getFieldObjectInspector(); String cat = oi.getCategory().toString(); if (oi.getCategory() == Category.PRIMITIVE) { cat = ((PrimitiveObjectInspector)oi).getPrimitiveCategory().toString(); } desc += field.getFieldName() + ":" + cat + ", "; } return desc; } }
notSupportedKeyTypes.add( (category != Category.PRIMITIVE ? category.toString() : ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory().toString()));
notSupportedKeyTypes.add( (category != Category.PRIMITIVE ? category.toString() : ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory().toString()));
throw new UnsupportedOperationException(String.format("Received unknown/unsupported type '%s'", poi.getPrimitiveCategory().toString()));
throw new UnsupportedOperationException(String.format("Received unknown/unsupported type '%s'", poi.getPrimitiveCategory().toString()));
return TypeProtos.MinorType.DATE; throwUnsupportedHiveDataTypeError(primitiveTypeInfo.getPrimitiveCategory().toString()); return null;
return (int) ((secondsAndNanos >>> 32) ^ secondsAndNanos); default: throw new UnsupportedOperationException("Computation of Hive bucket hashCode is not supported for Hive primitive category: " + primitiveCategory.toString() + ".");
public static HiveFieldConverter create(TypeInfo typeInfo) throws IllegalAccessException, InstantiationException { switch (typeInfo.getCategory()) { case PRIMITIVE: final PrimitiveCategory pCat = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory(); Class<? extends HiveFieldConverter> clazz = primMap.get(pCat); if (clazz != null) { return clazz.newInstance(); } throwUnsupportedHiveDataTypeError(pCat.toString()); break; case LIST: case MAP: case STRUCT: case UNION: default: throwUnsupportedHiveDataTypeError(typeInfo.getCategory().toString()); } return null; }
private String describeOi(String desc, ObjectInspector keyOi) { for (StructField field : ((StructObjectInspector)keyOi).getAllStructFieldRefs()) { ObjectInspector oi = field.getFieldObjectInspector(); String cat = oi.getCategory().toString(); if (oi.getCategory() == Category.PRIMITIVE) { cat = ((PrimitiveObjectInspector)oi).getPrimitiveCategory().toString(); } desc += field.getFieldName() + ":" + cat + ", "; } return desc; } }
private String describeOi(String desc, ObjectInspector keyOi) { for (StructField field : ((StructObjectInspector)keyOi).getAllStructFieldRefs()) { ObjectInspector oi = field.getFieldObjectInspector(); String cat = oi.getCategory().toString(); if (oi.getCategory() == Category.PRIMITIVE) { cat = ((PrimitiveObjectInspector)oi).getPrimitiveCategory().toString(); } desc += field.getFieldName() + ":" + cat + ", "; } return desc; } }