Class StringFieldWriter

    • Field Detail

      • NULL_ROW

        public static final byte NULL_ROW
        Null rows are represented by NULL_ROW. Same byte value as VALUE_TERMINATOR, but not ambiguous: NULL_ROW can only occur as the first byte in a row, and VALUE_TERMINATOR can never occur as the first byte in a row.
        See Also:
        Constant Field Values
      • NULL_BYTE

        public static final byte NULL_BYTE
        Different from the values in NullHandling, since we want to be able to sort as bytes, and we want nulls to come before non-nulls.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StringFieldWriter

        public StringFieldWriter​(DimensionSelector selector,
                                 boolean removeNullbytes)
    • 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 interface FieldWriter
        Parameters:
        memory - memory region in little-endian order
        position - position to write
        maxSize - maximum number of bytes to write
        Returns:
        number of bytes written, or -1 if "maxSize" was not enough memory