static OrcTimestamp nextTimestamp(ColumnVector vector, int row, Object previous) { if (vector.isRepeating) { row = 0; } if (vector.noNulls || !vector.isNull[row]) { OrcTimestamp result; if (previous == null || previous.getClass() != OrcTimestamp.class) { result = new OrcTimestamp(); } else { result = (OrcTimestamp) previous; } TimestampColumnVector tcv = (TimestampColumnVector) vector; result.setTime(tcv.time[row]); result.setNanos(tcv.nanos[row]); return result; } else { return null; } }
@Override protected WritableComparable convert(Object value) { return new OrcTimestamp((long) value); } }
@Override protected Object convert(WritableComparable value) { Preconditions.checkArgument(value instanceof OrcTimestamp); return BuildInScalarFunctions.internalToTimestamp(((OrcTimestamp) value).getTime()); } }
return new DateWritable(); case TIMESTAMP: return new OrcTimestamp(); case DECIMAL: return new HiveDecimalWritable();