private static boolean isNullValue(int arrayIndex, byte[] bytes, int initPos, byte serializationVersion, boolean useShort, int indexOffset, int currOffset, int elementLength) { if (isSeparatorByte(bytes, initPos, currOffset)) { if (isPriorValueZeroLength(arrayIndex, bytes, serializationVersion, useShort, indexOffset, currOffset)) { return true; } else { // if there's no prior null, there can be at most 1 null if (elementLength == 2) { // nullByte calculation comes from the encoding of one null // see PArrayDataType#serializeNulls byte nullByte = SortOrder.invert((byte)(0)); if (bytes[initPos+currOffset+1] == nullByte) { return true; } } } } return false; }
private static boolean isNullValue(int arrayIndex, byte[] bytes, int initPos, byte serializationVersion, boolean useShort, int indexOffset, int currOffset, int elementLength) { if (isSeparatorByte(bytes, initPos, currOffset)) { if (isPriorValueZeroLength(arrayIndex, bytes, serializationVersion, useShort, indexOffset, currOffset)) { return true; } else { // if there's no prior null, there can be at most 1 null if (elementLength == 2) { // nullByte calculation comes from the encoding of one null // see PArrayDataType#serializeNulls byte nullByte = SortOrder.invert((byte)(0)); if (bytes[initPos+currOffset+1] == nullByte) { return true; } } } } return false; }
private static boolean isNullValue(int arrayIndex, byte[] bytes, int initPos, byte serializationVersion, boolean useShort, int indexOffset, int currOffset, int elementLength) { if (isSeparatorByte(bytes, initPos, currOffset)) { if (isPriorValueZeroLength(arrayIndex, bytes, serializationVersion, useShort, indexOffset, currOffset)) { return true; } else { // if there's no prior null, there can be at most 1 null if (elementLength == 2) { // nullByte calculation comes from the encoding of one null // see PArrayDataType#serializeNulls byte nullByte = SortOrder.invert((byte)(0)); if (bytes[initPos+currOffset+1] == nullByte) { return true; } } } } return false; }