@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) objInspector).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); } }
@Override public void writeHiveIntervalDayTime(HiveIntervalDayTime vidt) throws IOException { beginElement(); if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } hiveIntervalDayTimeWritable.set(vidt); hiveIntervalDayTimeWritable.writeToByteStream(output); finishElement(); }
HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) poi).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); return;
@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) objInspector).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); } }
@Override public void writeHiveIntervalDayTime(HiveIntervalDayTime vidt) throws IOException { beginElement(); if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } hiveIntervalDayTimeWritable.set(vidt); hiveIntervalDayTimeWritable.writeToByteStream(output); finishElement(); }
@Override public void writeHiveIntervalDayTime(HiveIntervalDayTime vidt) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } hiveIntervalDayTimeWritable.set(vidt); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeHiveIntervalDayTime(HiveIntervalDayTime vidt) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } hiveIntervalDayTimeWritable.set(vidt); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeHiveIntervalDayTime(HiveIntervalDayTime vidt) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } hiveIntervalDayTimeWritable.set(vidt); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeHiveIntervalDayTime(long totalNanos) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTime == null) { hiveIntervalDayTime = new HiveIntervalDayTime(); } if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } DateUtils.setIntervalDayTimeTotalNanos(hiveIntervalDayTime, totalNanos); hiveIntervalDayTimeWritable.set(hiveIntervalDayTime); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeHiveIntervalDayTime(long totalNanos) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTime == null) { hiveIntervalDayTime = new HiveIntervalDayTime(); } if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } DateUtils.setIntervalDayTimeTotalNanos(hiveIntervalDayTime, totalNanos); hiveIntervalDayTimeWritable.set(hiveIntervalDayTime); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeHiveIntervalDayTime(long totalNanos) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); if (hiveIntervalDayTime == null) { hiveIntervalDayTime = new HiveIntervalDayTime(); } if (hiveIntervalDayTimeWritable == null) { hiveIntervalDayTimeWritable = new HiveIntervalDayTimeWritable(); } DateUtils.setIntervalDayTimeTotalNanos(hiveIntervalDayTime, totalNanos); hiveIntervalDayTimeWritable.set(hiveIntervalDayTime); hiveIntervalDayTimeWritable.writeToByteStream(output); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) poi).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); return;
HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) poi).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); return;
HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) poi).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); return;
HiveIntervalDayTimeWritable intervalDayTime = ((HiveIntervalDayTimeObjectInspector) poi).getPrimitiveWritableObject(obj); intervalDayTime.writeToByteStream(byteStream); return;