Package org.apache.druid.frame.field
Class ComplexFieldWriter
- java.lang.Object
-
- org.apache.druid.frame.field.ComplexFieldWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,FieldWriter
public class ComplexFieldWriter extends Object implements FieldWriter
Wraps aBaseObjectColumnValueSelectorand usesComplexMetricSerde.toBytes(java.lang.Object)to write complex objects. SeeComplexFieldReaderfor format details.
-
-
Field Summary
Fields Modifier and Type Field Description static byteNOT_NULL_BYTEstatic byteNULL_BYTE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases resources held by this writer.longwriteTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)Writes the current selection at the given memory position.
-
-
-
Field Detail
-
NULL_BYTE
public static final byte NULL_BYTE
- See Also:
- Constant Field Values
-
NOT_NULL_BYTE
public static final byte NOT_NULL_BYTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeTo
public long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)Description copied from interface:FieldWriterWrites the current selection at the given memory position.- Specified by:
writeToin interfaceFieldWriter- Parameters:
memory- memory region in little-endian orderposition- position to writemaxSize- maximum number of bytes to write- Returns:
- number of bytes written, or -1 if "maxSize" was not enough memory
-
close
public void close()
Description copied from interface:FieldWriterReleases resources held by this writer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFieldWriter
-
-