@Override public int getPayloadByteCount(int valueCount) { // For nullable, we include all values, null or not, in computing // the value length. return bits.getPayloadByteCount(valueCount) + values.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } return offsets.getPayloadByteCount(valueCount) + bits.getPayloadByteCount(valueCount) + super.getPayloadByteCount(valueCount); } }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } final int entryCount = offsets.getAccessor().get(valueCount); return offsets.getPayloadByteCount(valueCount) + vector.getPayloadByteCount(entryCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } int entryCount = offsets.getAccessor().get(valueCount); int count = offsets.getPayloadByteCount(valueCount); for (final ValueVector v : getChildren()) { count += v.getPayloadByteCount(entryCount); } return count; }
@Override public int getPayloadByteCount(int valueCount) { // For nullable, we include all values, null or not, in computing // the value length. return bits.getPayloadByteCount(valueCount) + values.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } return offsets.getPayloadByteCount(valueCount) + bits.getPayloadByteCount(valueCount) + super.getPayloadByteCount(valueCount); } }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } // If 1 or more values, then the last value is set to // the offset of the next value, which is the same as // the length of existing values. // In addition to the actual data bytes, we must also // include the "overhead" bytes: the offset vector entries // that accompany each column value. Thus, total payload // size is consumed text bytes + consumed offset vector // bytes. return offsetVector.getAccessor().get(valueCount) + offsetVector.getPayloadByteCount(valueCount); }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } final int entryCount = offsets.getAccessor().get(valueCount); return offsets.getPayloadByteCount(valueCount) + vector.getPayloadByteCount(entryCount); }
public static int getMetadataWidth(ValueVector vv) { int width = 0; if (vv instanceof NullableVector) { width += ((NullableVector)vv).getBitsVector().getPayloadByteCount(1); } if (vv instanceof VariableWidthVector) { width += ((VariableWidthVector)vv).getOffsetVector().getPayloadByteCount(1); } if (vv instanceof BaseRepeatedValueVector) { width += ((BaseRepeatedValueVector)vv).getOffsetVector().getPayloadByteCount(1); width += (getMetadataWidth(((BaseRepeatedValueVector)vv).getDataVector()) * RepeatedValueVector.DEFAULT_REPEAT_PER_RECORD); } return width; } }
@Override public int getPayloadByteCount(int valueCount) { if (valueCount == 0) { return 0; } int entryCount = offsets.getAccessor().get(valueCount); int count = offsets.getPayloadByteCount(valueCount); for (final ValueVector v : getChildren()) { count += v.getPayloadByteCount(entryCount); } return count; }
vectorMemoryUsage.offsetsByteCapacity = vector.getOffsetVector().getValueCapacity() * INT_VALUE_WIDTH; vectorMemoryUsage.dataByteCapacity = vector.getByteCapacity(); vectorMemoryUsage.offsetsBytesUsed = vector.getOffsetVector().getPayloadByteCount(currValueCount); vectorMemoryUsage.dataBytesUsed = vector.getPayloadByteCount(currValueCount) - vectorMemoryUsage.offsetsBytesUsed; break; vectorMemoryUsage.dataByteCapacity = values.getByteCapacity(); vectorMemoryUsage.bitsBytesUsed = currValueCount * BYTE_VALUE_WIDTH; vectorMemoryUsage.offsetsBytesUsed = values.getOffsetVector().getPayloadByteCount(currValueCount); vectorMemoryUsage.dataBytesUsed = values.getPayloadByteCount(currValueCount) - vectorMemoryUsage.offsetsBytesUsed; break; vectorMemoryUsage.offsetsByteCapacity = vector.getOffsetVector().getValueCapacity() * INT_VALUE_WIDTH; vectorMemoryUsage.dataByteCapacity = vector.getByteCapacity(); vectorMemoryUsage.offsetsBytesUsed = vector.getOffsetVector().getPayloadByteCount(currValueCount); vectorMemoryUsage.dataBytesUsed = vector.getPayloadByteCount(currValueCount) - vectorMemoryUsage.offsetsBytesUsed; break; vectorMemoryUsage.dataByteCapacity = values.getByteCapacity(); vectorMemoryUsage.bitsBytesUsed = currValueCount * BYTE_VALUE_WIDTH; vectorMemoryUsage.offsetsBytesUsed = values.getOffsetVector().getPayloadByteCount(currValueCount); vectorMemoryUsage.dataBytesUsed = values.getPayloadByteCount(currValueCount) - vectorMemoryUsage.offsetsBytesUsed; break; vectorMemoryUsage.offsetsByteCapacity = vector.getOffsetVector().getValueCapacity() * INT_VALUE_WIDTH; vectorMemoryUsage.dataByteCapacity = vector.getByteCapacity(); vectorMemoryUsage.offsetsBytesUsed = vector.getOffsetVector().getPayloadByteCount(currValueCount); vectorMemoryUsage.dataBytesUsed = vector.getPayloadByteCount(currValueCount) - vectorMemoryUsage.offsetsBytesUsed; break;