Class DecimalValueWriter
java.lang.Object
org.apache.drill.exec.store.parquet.decimal.DecimalValueWriter
- Direct Known Subclasses:
BinaryDecimalParquetValueWriter
,FixedLenDecimalParquetValueWriter
,Int32DecimalParquetValueWriter
,Int64DecimalParquetValueWriter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DecimalValueWriter
getDecimalValueWriterForType
(org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type) Creates and returns writer suitable for specifiedPrimitiveType.PrimitiveTypeName type
.abstract void
writeValue
(org.apache.parquet.io.api.RecordConsumer consumer, DrillBuf buffer, int start, int end, int precision) Takes value from specifiedDrillBuf buffer
, converts it into required format if needed and passes the value into specifiedRecordConsumer consumer
.
-
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 specifiedDrillBuf buffer
, converts it into required format if needed and passes the value into specifiedRecordConsumer consumer
.- Parameters:
consumer
- abstraction for writing recordsbuffer
- the source of data that should be writtenstart
- start position of data in bufferend
- end position of data in bufferprecision
- 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 specifiedPrimitiveType.PrimitiveTypeName type
.- Parameters:
type
- the type of the value in output file.- Returns:
- writer for decimal values.
-