Package org.apache.iceberg.variants
Interface VariantMetadata
public interface VariantMetadata
A variant metadata dictionary.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asString
(VariantMetadata metadata) int
Returns the size of the metadata dictionary.get
(int id) Returns the field name for an ID in metadata.int
Returns the ID for aname
in the dictionary, or -1 if not present.int
Returns the serialized size in bytes of this value.int
writeTo
(ByteBuffer buffer, int offset) Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.
-
Method Details
-
id
Returns the ID for aname
in the dictionary, or -1 if not present. -
get
Returns the field name for an ID in metadata.- Throws:
NoSuchElementException
- if the dictionary does not contain the ID
-
dictionarySize
int dictionarySize()Returns the size of the metadata dictionary. -
sizeInBytes
int sizeInBytes()Returns the serialized size in bytes of this value. -
writeTo
Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.sizeInBytes()
bytes will be written to the buffer.- Parameters:
buffer
- a ByteBuffer to write serialized metadata intooffset
- starting offset to write serialized metadata- Returns:
- the number of bytes written
-
asString
-