Skip to content

Commit

Permalink
Remove uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Mar 18, 2024
1 parent 80e58ea commit fc03003
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,13 @@ public UTF8String getUTF8String(int rowId) {
int length = Platform.getInt(null, offsetBufferAddress + (rowId + 1L) * 4L) - offset;
return UTF8String.fromAddress(null, valueBufferAddress + offset, length);
} else {
// Iceberg maps UUID to StringType.
// The data type here must be UUID because the only FLBA -> String mapping we have is UUID.
BaseFixedWidthVector fixedWidthVector = (BaseFixedWidthVector) valueVector;
int length = fixedWidthVector.getTypeWidth();
int offset = rowId * length;
byte[] result = new byte[length];
Platform.copyMemory(
null, valueBufferAddress + offset, result, Platform.BYTE_ARRAY_OFFSET, length);
if (length == 16) {
return UTF8String.fromString(convertToUuid(result).toString());
} else {
return UTF8String.fromBytes(result);
}
return UTF8String.fromBytes(result);
}
}

Expand Down

0 comments on commit fc03003

Please sign in to comment.