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 aBaseObjectColumnValueSelector
and usesComplexMetricSerde.toBytes(java.lang.Object)
to write complex objects. SeeComplexFieldReader
for format details.
-
-
Field Summary
Fields Modifier and Type Field Description static byte
NOT_NULL_BYTE
static byte
NULL_BYTE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases resources held by this writer.long
writeTo(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:FieldWriter
Writes the current selection at the given memory position.- Specified by:
writeTo
in 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:FieldWriter
Releases resources held by this writer.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceFieldWriter
-
-