public LazyTimestampLocalTZ(LazyTimestampLocalTZ copy) { super(copy); timeZone = copy.timeZone; data = new TimestampLocalTZWritable(copy.data); }
@Override public Object copyObject(Object o) { return o == null ? null : new TimestampLocalTZWritable((TimestampLocalTZWritable) o); } }
@Override public Object create(TimestampTZ t) { return new TimestampLocalTZWritable(t); }
@Override public Object create(byte[] bytes, int offset) { return new TimestampLocalTZWritable(bytes, offset, ((TimestampLocalTZTypeInfo) typeInfo).timeZone()); }
public LazyTimestampLocalTZ(LazyTimestampLocalTZObjectInspector lazyTimestampTZObjectInspector) { super(lazyTimestampTZObjectInspector); TimestampLocalTZTypeInfo typeInfo = (TimestampLocalTZTypeInfo) oi.getTypeInfo(); if (typeInfo == null) { throw new RuntimeException("TimestampLocalTZ type used without type params"); } timeZone = typeInfo.timeZone(); data = new TimestampLocalTZWritable(); }
public LazyBinaryTimestampLocalTZ(WritableTimestampLocalTZObjectInspector oi) { super(oi); TimestampLocalTZTypeInfo typeInfo = (TimestampLocalTZTypeInfo) oi.getTypeInfo(); this.timeZone = typeInfo.timeZone(); this.data = new TimestampLocalTZWritable(); }
public UDFDateFloor(String granularity) { this.granularity = QueryGranularity.fromString(granularity); this.resultTS = new TimestampWritableV2(); this.resultTSLTZ = new TimestampLocalTZWritable(); }
@Override public TimestampLocalTZWritable getPrimitiveWritableObject(Object o) { if (o == null) { return null; } TimestampTZ t = (TimestampTZ) o; TimestampLocalTZTypeInfo timestampTZTypeInfo = (TimestampLocalTZTypeInfo) typeInfo; if (!t.getZonedDateTime().getZone().equals(timestampTZTypeInfo.timeZone())) { t.setZonedDateTime( t.getZonedDateTime().withZoneSameInstant(timestampTZTypeInfo.timeZone())); } return new TimestampLocalTZWritable(t); }
return new TimestampLocalTZWritable(new TimestampTZ(ZonedDateTime.ofInstant(Instant.ofEpochMilli(numberOfMillis), ((TimestampLocalTZTypeInfo) typeInfo).timeZone())));
final TimestampLocalTZWritable t = new TimestampLocalTZWritable( new TimestampTZ(Instant.ofEpochMilli(494243222000L).atZone(ZoneId.of("America/Los_Angeles")))); UDFDateFloor g;
return t; case TIMESTAMPLOCALTZ: TimestampLocalTZWritable tstz = (reuse == null ? new TimestampLocalTZWritable() : (TimestampLocalTZWritable) reuse); byte[] data = new byte[TimestampLocalTZWritable.BINARY_SORTABLE_LENGTH];
public LazyTimestampLocalTZ(LazyTimestampLocalTZ copy) { super(copy); timeZone = copy.timeZone; data = new TimestampLocalTZWritable(copy.data); }
@Override public Object copyObject(Object o) { return o == null ? null : new TimestampLocalTZWritable((TimestampLocalTZWritable) o); } }
@Override public Object create(TimestampTZ t) { return new TimestampLocalTZWritable(t); }
@Override public Object create(byte[] bytes, int offset) { return new TimestampLocalTZWritable(bytes, offset, ((TimestampLocalTZTypeInfo) typeInfo).timeZone()); }
public LazyTimestampLocalTZ(LazyTimestampLocalTZObjectInspector lazyTimestampTZObjectInspector) { super(lazyTimestampTZObjectInspector); TimestampLocalTZTypeInfo typeInfo = (TimestampLocalTZTypeInfo) oi.getTypeInfo(); if (typeInfo == null) { throw new RuntimeException("TimestampLocalTZ type used without type params"); } timeZone = typeInfo.timeZone(); data = new TimestampLocalTZWritable(); }
public LazyBinaryTimestampLocalTZ(WritableTimestampLocalTZObjectInspector oi) { super(oi); TimestampLocalTZTypeInfo typeInfo = (TimestampLocalTZTypeInfo) oi.getTypeInfo(); this.timeZone = typeInfo.timeZone(); this.data = new TimestampLocalTZWritable(); }
@Override public TimestampLocalTZWritable getPrimitiveWritableObject(Object o) { if (o == null) { return null; } TimestampTZ t = (TimestampTZ) o; TimestampLocalTZTypeInfo timestampTZTypeInfo = (TimestampLocalTZTypeInfo) typeInfo; if (!t.getZonedDateTime().getZone().equals(timestampTZTypeInfo.timeZone())) { t.setZonedDateTime( t.getZonedDateTime().withZoneSameInstant(timestampTZTypeInfo.timeZone())); } return new TimestampLocalTZWritable(t); }
return new TimestampLocalTZWritable(new TimestampTZ(ZonedDateTime.ofInstant(Instant.ofEpochMilli(numberOfMillis), ((TimestampLocalTZTypeInfo) typeInfo).timeZone())));
return t; case TIMESTAMPLOCALTZ: TimestampLocalTZWritable tstz = (reuse == null ? new TimestampLocalTZWritable() : (TimestampLocalTZWritable) reuse); byte[] data = new byte[TimestampLocalTZWritable.BINARY_SORTABLE_LENGTH];