public class TimestampColumnReader extends AbstractColumnReader<WritableTimestampVector>
ColumnReader
. We only support INT96 bytes now, julianDay(4) + nanosOfDay(8).
See https://github.com/apache/parquet-format/blob/master/DataTypes.md#timestamp TIMESTAMP_MILLIS
and TIMESTAMP_MICROS are the deprecated ConvertedType.Modifier and Type | Field and Description |
---|---|
static int |
JULIAN_EPOCH_OFFSET_DAYS |
static long |
MILLIS_IN_DAY |
static long |
NANOS_PER_MILLISECOND |
static long |
NANOS_PER_SECOND |
descriptor, dictionary, maxDefLevel, runLenDecoder
Constructor and Description |
---|
TimestampColumnReader(boolean utcTimestamp,
org.apache.parquet.column.ColumnDescriptor descriptor,
org.apache.parquet.column.page.PageReader pageReader) |
Modifier and Type | Method and Description |
---|---|
static Timestamp |
decodeInt96ToTimestamp(boolean utcTimestamp,
org.apache.parquet.column.Dictionary dictionary,
int id) |
static Timestamp |
int96ToTimestamp(boolean utcTimestamp,
long nanosOfDay,
int julianDay) |
protected void |
readBatch(int rowId,
int num,
WritableTimestampVector column)
Read batch from
AbstractColumnReader.runLenDecoder and AbstractColumnReader.dataInputStream . |
protected void |
readBatchFromDictionaryIds(int rowId,
int num,
WritableTimestampVector column,
WritableIntVector dictionaryIds)
Decode dictionary ids to data.
|
protected boolean |
supportLazyDecode()
Support lazy dictionary ids decode.
|
afterReadPage, checkTypeName, readToVector
public static final int JULIAN_EPOCH_OFFSET_DAYS
public static final long MILLIS_IN_DAY
public static final long NANOS_PER_MILLISECOND
public static final long NANOS_PER_SECOND
public TimestampColumnReader(boolean utcTimestamp, org.apache.parquet.column.ColumnDescriptor descriptor, org.apache.parquet.column.page.PageReader pageReader) throws IOException
IOException
protected boolean supportLazyDecode()
AbstractColumnReader
ParquetDictionary
. If return false,
we will decode all the data first.supportLazyDecode
in class AbstractColumnReader<WritableTimestampVector>
protected void readBatch(int rowId, int num, WritableTimestampVector column)
AbstractColumnReader
AbstractColumnReader.runLenDecoder
and AbstractColumnReader.dataInputStream
.readBatch
in class AbstractColumnReader<WritableTimestampVector>
protected void readBatchFromDictionaryIds(int rowId, int num, WritableTimestampVector column, WritableIntVector dictionaryIds)
AbstractColumnReader
AbstractColumnReader.runLenDecoder
and AbstractColumnReader.dictionaryIdsDecoder
.readBatchFromDictionaryIds
in class AbstractColumnReader<WritableTimestampVector>
public static Timestamp decodeInt96ToTimestamp(boolean utcTimestamp, org.apache.parquet.column.Dictionary dictionary, int id)
public static Timestamp int96ToTimestamp(boolean utcTimestamp, long nanosOfDay, int julianDay)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.