internal static ObjectInspector getPrimitiveWritableObjectInspector(PrimitiveTypeInfo primitiveTypeInfo)
        {
            switch (primitiveTypeInfo.getPrimitiveCategory())
            {
            case PrimitiveCategory.BINARY:
                return(writableBinaryObjectInspector);

            case PrimitiveCategory.BOOLEAN:
                return(writableBooleanObjectInspector);

            case PrimitiveCategory.BYTE:
                return(writableByteObjectInspector);

            case PrimitiveCategory.DATE:
                return(writableDateObjectInspector);

            case PrimitiveCategory.DECIMAL:
                DecimalTypeInfo decimalInfo = (DecimalTypeInfo)primitiveTypeInfo;
                return(new HiveDecimalObjectInspector(decimalInfo.precision(), decimalInfo.scale()));

            case PrimitiveCategory.DOUBLE:
                return(writableDoubleObjectInspector);

            case PrimitiveCategory.FLOAT:
                return(writableFloatObjectInspector);

            case PrimitiveCategory.INT:
                return(writableIntObjectInspector);

            case PrimitiveCategory.LONG:
                return(writableLongObjectInspector);

            case PrimitiveCategory.SHORT:
                return(writableShortObjectInspector);

            case PrimitiveCategory.CHAR:
                return(new CharObjectInspector((CharTypeInfo)primitiveTypeInfo));

            case PrimitiveCategory.STRING:
                return(writableStringObjectInspector);

            case PrimitiveCategory.VARCHAR:
                return(new VarcharObjectInspector((VarcharTypeInfo)primitiveTypeInfo));

            case PrimitiveCategory.TIMESTAMP:
                return(writableTimestampObjectInspector);

            default:
                throw new NotImplementedException(primitiveTypeInfo.getPrimitiveCategory().ToString());
            }
        }
        internal static PrimitiveTypeEntry getTypeEntryFromTypeName(string typeName)
        {
            PrimitiveTypeInfo info = TypeInfoFactory.getPrimitiveTypeInfo(typeName) as PrimitiveTypeInfo;

            if (info != null)
            {
                return(new PrimitiveTypeEntry
                {
                    primitiveCategory = info.getPrimitiveCategory(),
                    typeName = typeName,
                });
            }
            return(null);
        }
 protected PrimitiveObjectInspector(PrimitiveTypeInfo typeInfo)
 {
     this.typeInfo = typeInfo;
 }
 protected StringBaseObjectInspector(PrimitiveTypeInfo typeInfo)
     : base(typeInfo)
 {
 }
 internal static ObjectInspector getPrimitiveJavaObjectInspector(PrimitiveTypeInfo primitiveTypeInfo)
 {
     throw new NotImplementedException();
 }