private static VectorExpressionWriter genVectorExpressionWritableByte( SettableByteObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterLong() { private Object obj; public VectorExpressionWriter init(SettableByteObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(long value) throws HiveException { ((SettableByteObjectInspector) this.objectInspector).set(this.obj, (byte) value); return this.obj; } @Override public Object setValue(Object field, long value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableByteObjectInspector) this.objectInspector).set(field, (byte) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableByteObjectInspector) this.objectInspector) .create((byte) 0); } }.init(fieldObjInspector); }
private static VectorExpressionWriter genVectorExpressionWritableByte( SettableByteObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterLong() { private Object obj; public VectorExpressionWriter init(SettableByteObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(long value) throws HiveException { ((SettableByteObjectInspector) this.objectInspector).set(this.obj, (byte) value); return this.obj; } @Override public Object setValue(Object field, long value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableByteObjectInspector) this.objectInspector).set(field, (byte) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableByteObjectInspector) this.objectInspector) .create((byte) 0); } }.init(fieldObjInspector); }
private static VectorExpressionWriter genVectorExpressionWritableByte( SettableByteObjectInspector fieldObjInspector) throws HiveException { return new VectorExpressionWriterLong() { private Object obj; public VectorExpressionWriter init(SettableByteObjectInspector objInspector) throws HiveException { super.init(objInspector); this.obj = initValue(null); return this; } @Override public Object writeValue(long value) throws HiveException { ((SettableByteObjectInspector) this.objectInspector).set(this.obj, (byte) value); return this.obj; } @Override public Object setValue(Object field, long value) throws HiveException { if (null == field) { field = initValue(null); } ((SettableByteObjectInspector) this.objectInspector).set(field, (byte) value); return field; } @Override public Object initValue(Object ignored) { return ((SettableByteObjectInspector) this.objectInspector) .create((byte) 0); } }.init(fieldObjInspector); }