public class ParquetDecimalVector extends Object implements DecimalColumnVector, WritableLongVector, WritableIntVector, WritableBytesVector, ElementCountable
DecimalColumnVector
interface.BytesColumnVector.Bytes
Constructor and Description |
---|
ParquetDecimalVector(ColumnVector vector,
int len) |
Modifier and Type | Method and Description |
---|---|
void |
appendBytes(int rowId,
byte[] value,
int offset,
int length)
Append byte[] at rowId with the provided value.
|
void |
fill(byte[] value)
Fill the column vector with the provided value.
|
void |
fill(int value)
Fill the column vector with the provided value.
|
void |
fill(long value)
Fill the column vector with the provided value.
|
void |
fillWithNulls()
Fill the column vector with nulls.
|
BytesColumnVector.Bytes |
getBytes(int i) |
Decimal |
getDecimal(int i,
int precision,
int scale) |
WritableIntVector |
getDictionaryIds()
Get reserved dictionary ids.
|
int |
getInt(int i) |
int |
getLen() |
long |
getLong(int i) |
ColumnVector |
getVector() |
boolean |
hasDictionary()
Check if there's a dictionary.
|
boolean |
isNullAt(int i) |
WritableIntVector |
reserveDictionaryIds(int capacity)
Reserve a integer column for ids of dictionary.
|
void |
reset()
Resets the column to default state.
|
void |
setDictionary(Dictionary dictionary)
Set the dictionary, it should work with dictionary ids.
|
void |
setInt(int rowId,
int value)
Set int at rowId with the provided value.
|
void |
setInts(int rowId,
int count,
int value)
Sets value to [rowId, rowId + count) by the value, this is data that repeats continuously.
|
void |
setInts(int rowId,
int count,
int[] src,
int srcIndex)
Sets values from [src[srcIndex], src[srcIndex + count]) to [rowId, rowId + count).
|
void |
setIntsFromBinary(int rowId,
int count,
byte[] src,
int srcIndex)
Set ints from binary, need use UNSAFE to copy.
|
void |
setLong(int rowId,
long value)
Set long at rowId with the provided value.
|
void |
setLongsFromBinary(int rowId,
int count,
byte[] src,
int srcIndex)
Set longs from binary, need use UNSAFE to copy.
|
void |
setNullAt(int rowId)
Set null at rowId.
|
void |
setNulls(int rowId,
int count)
Set nulls from rowId to rowId + count (exclude).
|
public ParquetDecimalVector(ColumnVector vector, int len)
public Decimal getDecimal(int i, int precision, int scale)
getDecimal
in interface DecimalColumnVector
public ColumnVector getVector()
public boolean isNullAt(int i)
isNullAt
in interface ColumnVector
public void reset()
WritableColumnVector
reset
in interface WritableColumnVector
public void setNullAt(int rowId)
WritableColumnVector
setNullAt
in interface WritableColumnVector
public void setNulls(int rowId, int count)
WritableColumnVector
setNulls
in interface WritableColumnVector
public void fillWithNulls()
WritableColumnVector
fillWithNulls
in interface WritableColumnVector
public void setDictionary(Dictionary dictionary)
WritableColumnVector
setDictionary
in interface WritableColumnVector
public boolean hasDictionary()
WritableColumnVector
hasDictionary
in interface WritableColumnVector
public WritableIntVector reserveDictionaryIds(int capacity)
WritableColumnVector
WritableIntVector
should be equal to or bigger than capacity. DictionaryIds must inconsistent with WritableColumnVector.setDictionary(org.apache.paimon.data.columnar.Dictionary)
. We don't support a mix of dictionary.reserveDictionaryIds
in interface WritableColumnVector
public WritableIntVector getDictionaryIds()
WritableColumnVector
getDictionaryIds
in interface WritableColumnVector
public BytesColumnVector.Bytes getBytes(int i)
getBytes
in interface BytesColumnVector
public void appendBytes(int rowId, byte[] value, int offset, int length)
WritableBytesVector
appendBytes
in interface WritableBytesVector
public void fill(byte[] value)
WritableBytesVector
fill
in interface WritableBytesVector
public int getInt(int i)
getInt
in interface IntColumnVector
public void setInt(int rowId, int value)
WritableIntVector
setInt
in interface WritableIntVector
public void setIntsFromBinary(int rowId, int count, byte[] src, int srcIndex)
WritableIntVector
setIntsFromBinary
in interface WritableIntVector
rowId
- set start rowId.count
- count for int, so the bytes size is count * 4.src
- source binary.srcIndex
- source binary index, it is the index for byte index.public void setInts(int rowId, int count, int value)
WritableIntVector
setInts
in interface WritableIntVector
public void setInts(int rowId, int count, int[] src, int srcIndex)
WritableIntVector
setInts
in interface WritableIntVector
public void fill(int value)
WritableIntVector
fill
in interface WritableIntVector
public long getLong(int i)
getLong
in interface LongColumnVector
public void setLong(int rowId, long value)
WritableLongVector
setLong
in interface WritableLongVector
public void setLongsFromBinary(int rowId, int count, byte[] src, int srcIndex)
WritableLongVector
setLongsFromBinary
in interface WritableLongVector
rowId
- set start rowId.count
- count for long, so the bytes size is count * 8.src
- source binary.srcIndex
- source binary index, it is the index for byte index.public void fill(long value)
WritableLongVector
fill
in interface WritableLongVector
public int getLen()
getLen
in interface ElementCountable
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.