@Override public Object convert(Object input) { if (input == null) { return null; } return outputOI.set(r, PrimitiveObjectInspectorUtils.getTimestampLocalTZ(input, inputOI, timeZone)); } }
private static Timestamp getTimestamp(Object object, TimestampObjectInspector inspector) { // handle broken ObjectInspectors if (object instanceof TimestampWritable) { return ((TimestampWritable) object).getTimestamp(); } return inspector.getPrimitiveJavaObject(object); } }
public Object convert(Object input) { if (input == null) { return null; } return outputOI.set(r, PrimitiveObjectInspectorUtils.getTimestamp(input, inputOI, intToTimestampInSeconds)); } }
@Override public Object convert(Object input) { if (input == null) { return null; } try { return outputOI.set(r, PrimitiveObjectInspectorUtils.getBoolean(input, inputOI)); } catch (NumberFormatException e) { return null; } } }
@Override public Object convert(Object input) { if (input == null) { return null; } return outputOI.set(r, PrimitiveObjectInspectorUtils.getHiveDecimal(input, inputOI)); } }
public Object convert(Object input) { if (input == null) { return null; } return outputOI.set(r, PrimitiveObjectInspectorUtils.getHiveIntervalYearMonth(input, inputOI)); } }
public Object convert(Object input) { if (input == null) { return null; } return outputOI.set(r, PrimitiveObjectInspectorUtils.getHiveIntervalDayTime(input, inputOI)); } }
@Override public Object writeValue(long value) throws HiveException { ((SettableLongObjectInspector) this.objectInspector).set(this.obj, value); return this.obj; }
@Override public Object writeValue(long value) throws HiveException { ((SettableShortObjectInspector) this.objectInspector).set(this.obj, (short) value); return this.obj; }
@Override public Object writeValue(long value) throws HiveException { ((SettableByteObjectInspector) this.objectInspector).set(this.obj, (byte) value); return this.obj; }
@Override public Object initValue(Object ignored) { return ((SettableStringObjectInspector) this.objectInspector).create(StringUtils.EMPTY); } }.init(fieldObjInspector);