Examples of WritableConstantByteObjectInspector


Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableConstantByteObjectInspector

            return (long) intOI.getWritableConstantValue().get();
        } else if(SMALLINT_TYPE_NAME.equals(typeName)) {
            WritableConstantShortObjectInspector shortOI = (WritableConstantShortObjectInspector) numberOI;
            return (long) shortOI.getWritableConstantValue().get();
        } else if(TINYINT_TYPE_NAME.equals(typeName)) {
            WritableConstantByteObjectInspector byteOI = (WritableConstantByteObjectInspector) numberOI;
            return (long) byteOI.getWritableConstantValue().get();
        }
        throw new UDFArgumentException("Unexpected argument type to cast as long: "
                + TypeInfoUtils.getTypeInfoFromObjectInspector(numberOI));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.