Class DoubleFieldWriter

java.lang.Object
org.apache.druid.frame.field.NumericFieldWriter
org.apache.druid.frame.field.DoubleFieldWriter
All Implemented Interfaces:
Closeable, AutoCloseable, FieldWriter

public class DoubleFieldWriter extends NumericFieldWriter
Wraps a BaseDoubleColumnValueSelector and writes field values.
See Also:
  • Method Details

    • forPrimitive

      public static DoubleFieldWriter forPrimitive(BaseDoubleColumnValueSelector selector, FrameType frameType)
    • forArray

      public static DoubleFieldWriter forArray(BaseDoubleColumnValueSelector selector, FrameType frameType)
    • getNumericSizeBytes

      public int getNumericSizeBytes()
      Specified by:
      getNumericSizeBytes in class NumericFieldWriter
      Returns:
      The size in bytes of the numeric datatype that the implementation of this writer occupies
    • writeSelectorToMemory

      public void writeSelectorToMemory(org.apache.datasketches.memory.WritableMemory memory, long position)
      Description copied from class: NumericFieldWriter
      Writes the value pointed by the selector to memory. The caller should ensure that the selector gives out the correct primitive type
      Specified by:
      writeSelectorToMemory in class NumericFieldWriter
    • writeNullToMemory

      public void writeNullToMemory(org.apache.datasketches.memory.WritableMemory memory, long position)
      Description copied from class: NumericFieldWriter
      Writes the default value for the type to the memory. For long, it is 0L, for double, it is 0.0d etc. Useful mainly when the SQL incompatible mode is turned off, and maintains the fact that the size of the numeric field written doesn't vary irrespective of whether the value is null
      Specified by:
      writeNullToMemory in class NumericFieldWriter