use of org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaBinaryObjectInspector in project hive by apache.
the class TestLazyBinarySerDe method testJavaBinaryObjectInspector.
/**
* Test to see if byte[] with correct contents is generated by
* JavaBinaryObjectInspector from input BytesWritable
* @throws Throwable
*/
public void testJavaBinaryObjectInspector() throws Throwable {
BytesWritable bW = getInputBytesWritable();
//create JavaBinaryObjectInspector
JavaBinaryObjectInspector binInspector = PrimitiveObjectInspectorFactory.javaByteArrayObjectInspector;
//convert BytesWritable to byte][
byte[] outBARef = binInspector.set(null, bW);
assertTrue("compare input and output BAs", Arrays.equals(inpBArray, outBARef));
}
Aggregations