@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { DoubleObjectInspector doi = (DoubleObjectInspector) objInspector; LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); } }
@Override public void writeDouble(double v) throws IOException { beginElement(); LazyBinaryUtils.writeDouble(output, v); finishElement(); }
LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); return;
@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { DoubleObjectInspector doi = (DoubleObjectInspector) objInspector; LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); } }
@Override public void writeDouble(double v) throws IOException { beginElement(); LazyBinaryUtils.writeDouble(output, v); finishElement(); }
@Override public void writeDouble(double v) 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); LazyBinaryUtils.writeDouble(output, v); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeDouble(double v) 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); LazyBinaryUtils.writeDouble(output, v); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
@Override public void writeDouble(double v) 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); LazyBinaryUtils.writeDouble(output, v); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }
LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); return;
LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); return;
LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); return;
LazyBinaryUtils.writeDouble(byteStream, doi.get(obj)); return;