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 theVariantValuefor the field namednamein this object.intReturns the number of fields stored in this object.voidput(String field, VariantValue value) voidintReturns the serialized size in bytes of this value.toString()intwriteTo(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, waitMethods inherited from interface org.apache.iceberg.variants.VariantObject
asObject, typeMethods inherited from interface org.apache.iceberg.variants.VariantValue
asArray, asPrimitive
-
Method Details
-
fieldNames
Description copied from interface:VariantObjectReturns the names of fields stored in this object.- Specified by:
fieldNamesin interfaceVariantObject
-
numFields
public int numFields()Description copied from interface:VariantObjectReturns the number of fields stored in this object.- Specified by:
numFieldsin interfaceVariantObject
-
remove
-
put
-
get
Description copied from interface:VariantObjectReturns theVariantValuefor the field namednamein this object.- Specified by:
getin interfaceVariantObject
-
sizeInBytes
public int sizeInBytes()Description copied from interface:VariantValueReturns the serialized size in bytes of this value.- Specified by:
sizeInBytesin interfaceVariantValue
-
writeTo
Description copied from interface:VariantValueWrites this value to the buffer at the given offset, ignoring the buffer's position and limit.- Specified by:
writeToin interfaceVariantValue
-
toString
-