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