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 a BaseObjectColumnValueSelector and uses ComplexMetricSerde.toBytes(java.lang.Object) to write complex objects. See ComplexFieldReader for format details.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
     
    static final byte
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • 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
    • close

      public void close()
      Description copied from interface: FieldWriter
      Releases resources held by this writer.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface FieldWriter