Package org.apache.druid.frame.field
Class StringFieldWriter
java.lang.Object
org.apache.druid.frame.field.StringFieldWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,FieldWriter
Wraps a
DimensionSelector and writes to rframe rows.
See StringFieldReader for format details.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final byteDifferent from the values inTypeStrategies, since we want to be able to sort as bytes, and we want nulls to come before non-nulls.static final byteNull rows are represented byNULL_ROW.static final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
VALUE_TERMINATOR
public static final byte VALUE_TERMINATOR- See Also:
-
ROW_TERMINATOR
public static final byte ROW_TERMINATOR- See Also:
-
NULL_ROW
public static final byte NULL_ROWNull rows are represented byNULL_ROW. Same byte value asVALUE_TERMINATOR, but not ambiguous:NULL_ROWcan only occur as the first byte in a row, andVALUE_TERMINATORcan never occur as the first byte in a row.- See Also:
-
NULL_BYTE
public static final byte NULL_BYTEDifferent from the values inTypeStrategies, since we want to be able to sort as bytes, and we want nulls to come before non-nulls.- See Also:
-
NOT_NULL_BYTE
public static final byte NOT_NULL_BYTE- See Also:
-
-
Constructor Details
-
StringFieldWriter
-
-
Method Details
-
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
-