Package org.apache.iceberg.variants
Class ShreddedObject
java.lang.Object
org.apache.iceberg.variants.ShreddedObject
- All Implemented Interfaces:
VariantObject
,VariantValue
A variant Object that handles full or partial shredding.
Metadata stored for an object must be the same regardless of whether the object is shredded. This class assumes that the metadata from the unshredded object can be used for the shredded fields. This also does not allow updating or replacing the metadata for the unshredded object, which could require recursively rewriting field IDs.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the names of fields stored in this object.Returns theVariantValue
for the field namedname
in this object.int
Returns the number of fields stored in this object.void
put
(String field, VariantValue value) void
int
Returns the serialized size in bytes of this value.toString()
int
writeTo
(ByteBuffer buffer, int offset) Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.iceberg.variants.VariantObject
asObject, type
Methods inherited from interface org.apache.iceberg.variants.VariantValue
asArray, asPrimitive
-
Method Details
-
fieldNames
Description copied from interface:VariantObject
Returns the names of fields stored in this object.- Specified by:
fieldNames
in interfaceVariantObject
-
numFields
public int numFields()Description copied from interface:VariantObject
Returns the number of fields stored in this object.- Specified by:
numFields
in interfaceVariantObject
-
remove
-
put
-
get
Description copied from interface:VariantObject
Returns theVariantValue
for the field namedname
in this object.- Specified by:
get
in interfaceVariantObject
-
sizeInBytes
public int sizeInBytes()Description copied from interface:VariantValue
Returns the serialized size in bytes of this value.- Specified by:
sizeInBytes
in interfaceVariantValue
-
writeTo
Description copied from interface:VariantValue
Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.- Specified by:
writeTo
in interfaceVariantValue
-
toString
-