Package org.apache.druid.frame.field
Interface FieldWriter
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ComplexFieldWriter,DoubleFieldWriter,FloatFieldWriter,LongFieldWriter,NumericArrayFieldWriter,NumericFieldWriter,StringArrayFieldWriter,StringFieldWriter
Helper used to write field values to row-based frames or
RowKey.
Most callers should use FrameWriters to build frames from
ColumnSelectorFactory, rather than using this interface directly.
Not thread-safe.-
Method Summary
-
Method Details
-
writeTo
long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize) Writes the current selection at the given memory position.- 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
void close()Releases resources held by this writer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-