Class DecimalValueWriter

java.lang.Object
org.apache.drill.exec.store.parquet.decimal.DecimalValueWriter
Direct Known Subclasses:
BinaryDecimalParquetValueWriter, FixedLenDecimalParquetValueWriter, Int32DecimalParquetValueWriter, Int64DecimalParquetValueWriter

public abstract class DecimalValueWriter extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getDecimalValueWriterForType(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type)
    Creates and returns writer suitable for specified PrimitiveType.PrimitiveTypeName type.
    abstract void
    writeValue(org.apache.parquet.io.api.RecordConsumer consumer, DrillBuf buffer, int start, int end, int precision)
    Takes value from specified DrillBuf buffer, converts it into required format if needed and passes the value into specified RecordConsumer consumer.

    Methods inherited from class java.lang.Object

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

    • DecimalValueWriter

      public DecimalValueWriter()
  • Method Details

    • writeValue

      public abstract void writeValue(org.apache.parquet.io.api.RecordConsumer consumer, DrillBuf buffer, int start, int end, int precision)
      Takes value from specified DrillBuf buffer, converts it into required format if needed and passes the value into specified RecordConsumer consumer.
      Parameters:
      consumer - abstraction for writing records
      buffer - the source of data that should be written
      start - start position of data in buffer
      end - end position of data in buffer
      precision - precision of the value that should be stored
    • getDecimalValueWriterForType

      public static DecimalValueWriter getDecimalValueWriterForType(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type)
      Creates and returns writer suitable for specified PrimitiveType.PrimitiveTypeName type.
      Parameters:
      type - the type of the value in output file.
      Returns:
      writer for decimal values.