Examples of WritableConstantBooleanObjectInspector


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

        String typeName = oi.getTypeName();
        if(!BOOLEAN_TYPE_NAME.equals(typeName)) {
            throw new UDFArgumentException("argument must be a boolean value: "
                    + TypeInfoUtils.getTypeInfoFromObjectInspector(oi));
        }
        WritableConstantBooleanObjectInspector booleanOI = (WritableConstantBooleanObjectInspector) oi;
        return booleanOI.getWritableConstantValue().get();
    }
View Full Code Here

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

         || ((PrimitiveObjectInspector)flagInsp).getPrimitiveCategory()
             != PrimitiveCategory.BOOLEAN
         || !(flagInsp instanceof ConstantObjectInspector )) {
        throw new UDFArgumentException(" ToJson takes an object as an argument, and an optional to_camel_case flag");
      }
      WritableConstantBooleanObjectInspector constInsp= (WritableConstantBooleanObjectInspector) flagInsp;
      convertFlag = constInsp.getWritableConstantValue().get();
    }
   
    jsonFactory = new JsonFactory();

    return PrimitiveObjectInspectorFactory.javaStringObjectInspector;
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.