java.lang.Object
org.apache.arrow.vector.types.pojo.ArrowType
org.apache.arrow.vector.types.pojo.ArrowType.ComplexType
org.apache.arrow.vector.types.pojo.ArrowType.ExtensionType
org.apache.arrow.vector.extension.UuidType
Extension type for UUID (Universally Unique Identifier) values.
UUIDs are stored as 16-byte fixed-size binary values. This extension type provides a standardized way to represent UUIDs in Arrow, making them interoperable across different systems and languages.π
The extension name is "arrow.uuid" and it uses ArrowType.FixedSizeBinary with 16 bytes
as the storage type.
Usage:
UuidVector vector = new UuidVector("uuid_col", allocator);
vector.set(0, UUID.randomUUID());
UUID value = vector.getObject(0);
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.arrow.vector.types.pojo.ArrowType
ArrowType.ArrowTypeID, ArrowType.ArrowTypeVisitor<T>, ArrowType.Binary, ArrowType.BinaryView, ArrowType.Bool, ArrowType.ComplexType, ArrowType.ComplexTypeVisitor<T>, ArrowType.Date, ArrowType.Decimal, ArrowType.Duration, ArrowType.ExtensionType, ArrowType.FixedSizeBinary, ArrowType.FixedSizeList, ArrowType.FloatingPoint, ArrowType.Int, ArrowType.Interval, ArrowType.LargeBinary, ArrowType.LargeList, ArrowType.LargeListView, ArrowType.LargeUtf8, ArrowType.List, ArrowType.ListView, ArrowType.Map, ArrowType.Null, ArrowType.PrimitiveType, ArrowType.PrimitiveTypeVisitor<T>, ArrowType.RunEndEncoded, ArrowType.Struct, ArrowType.Time, ArrowType.Timestamp, ArrowType.Union, ArrowType.Utf8, ArrowType.Utf8View -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExtension name registered in the Arrow extension type registry.static final UuidTypeSingleton instance of UuidType.static final ArrowTypeStorage type for UUID: FixedSizeBinary(16).static final intNumber of bytes used to store a UUID (128 bits = 16 bytes).static final intNumber of characters in the standard UUID string representation (with hyphens).Fields inherited from class org.apache.arrow.vector.types.pojo.ArrowType.ExtensionType
EXTENSION_METADATA_KEY_METADATA, EXTENSION_METADATA_KEY_NAME -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(ArrowType storageType, String serializedData) Given saved metadata and the underlying storage type, construct a new instance of the user type.booleanCheck equality of this type to another user-defined type.The name of this user-defined type.getNewFieldWriter(ValueVector vector) getNewVector(String name, FieldType fieldType, BufferAllocator allocator) Construct a vector for the user type.booleanSave any metadata for this type.The on-wire type for this user-defined type.Methods inherited from class org.apache.arrow.vector.types.pojo.ArrowType.ExtensionType
accept, equals, getType, getTypeID, hashCode, toStringMethods inherited from class org.apache.arrow.vector.types.pojo.ArrowType
getInt, getTypeForField
-
Field Details
-
INSTANCE
Singleton instance of UuidType. -
EXTENSION_NAME
Extension name registered in the Arrow extension type registry.- See Also:
-
UUID_BYTE_WIDTH
public static final int UUID_BYTE_WIDTHNumber of bytes used to store a UUID (128 bits = 16 bytes).- See Also:
-
UUID_STRING_WIDTH
public static final int UUID_STRING_WIDTHNumber of characters in the standard UUID string representation (with hyphens).- See Also:
-
STORAGE_TYPE
Storage type for UUID: FixedSizeBinary(16).
-
-
Method Details
-
storageType
Description copied from class:ArrowType.ExtensionTypeThe on-wire type for this user-defined type.- Specified by:
storageTypein classArrowType.ExtensionType
-
extensionName
Description copied from class:ArrowType.ExtensionTypeThe name of this user-defined type. Used to identify the type during serialization.- Specified by:
extensionNamein classArrowType.ExtensionType
-
extensionEquals
Description copied from class:ArrowType.ExtensionTypeCheck equality of this type to another user-defined type.- Specified by:
extensionEqualsin classArrowType.ExtensionType
-
deserialize
Description copied from class:ArrowType.ExtensionTypeGiven saved metadata and the underlying storage type, construct a new instance of the user type.- Specified by:
deserializein classArrowType.ExtensionType
-
serialize
Description copied from class:ArrowType.ExtensionTypeSave any metadata for this type.- Specified by:
serializein classArrowType.ExtensionType
-
isComplex
public boolean isComplex()- Overrides:
isComplexin classArrowType.ComplexType
-
getNewVector
Description copied from class:ArrowType.ExtensionTypeConstruct a vector for the user type.- Specified by:
getNewVectorin classArrowType.ExtensionType
-
getNewFieldWriter
- Overrides:
getNewFieldWriterin classArrowType.ExtensionType
-