@Internal public final class BinaryArrayWriter extends Object
BinaryArrayData.| 限定符和类型 | 类和说明 |
|---|---|
static interface |
BinaryArrayWriter.NullSetter
Accessor for setting the elements of an array writer to
null during runtime. |
BinaryWriter.ValueSetter| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
cursor |
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper |
outputView |
protected org.apache.flink.core.memory.MemorySegment |
segment |
| 构造器和说明 |
|---|
BinaryArrayWriter(org.apache.flink.table.data.binary.BinaryArrayData array,
int numElements,
int elementSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterGrow()
After grow, need point to new memory.
|
void |
complete()
Finally, complete write to set real size to row.
|
static BinaryArrayWriter.NullSetter |
createNullSetter(org.apache.flink.table.types.logical.LogicalType elementType)
Creates an for accessor setting the elements of an array writer to
null during runtime. |
protected void |
ensureCapacity(int neededSize) |
int |
getFieldOffset(int pos)
Get field offset.
|
int |
getNumElements() |
org.apache.flink.core.memory.MemorySegment |
getSegments() |
void |
reset()
First, reset.
|
protected static int |
roundNumberOfBytesToNearestWord(int numBytes) |
void |
setNullAt(int ordinal)
Set null to this field.
|
void |
setNullAt(int pos,
org.apache.flink.table.types.logical.LogicalType type)
已过时。
Use
createNullSetter(LogicalType) for avoiding logical types during runtime. |
void |
setNullBit(int ordinal) |
void |
setNullBoolean(int ordinal) |
void |
setNullByte(int ordinal) |
void |
setNullDouble(int ordinal) |
void |
setNullFloat(int ordinal) |
void |
setNullInt(int ordinal) |
void |
setNullLong(int ordinal) |
void |
setNullShort(int ordinal) |
void |
setOffsetAndSize(int pos,
int offset,
long size)
Set offset and size to fix len part.
|
void |
writeArray(int pos,
org.apache.flink.table.data.ArrayData input,
ArrayDataSerializer serializer) |
void |
writeBinary(int pos,
byte[] bytes) |
void |
writeBoolean(int pos,
boolean value) |
void |
writeByte(int pos,
byte value) |
void |
writeDecimal(int pos,
org.apache.flink.table.data.DecimalData value,
int precision) |
void |
writeDouble(int pos,
double value) |
void |
writeFloat(int pos,
float value) |
void |
writeInt(int pos,
int value) |
void |
writeLong(int pos,
long value) |
void |
writeMap(int pos,
org.apache.flink.table.data.MapData input,
MapDataSerializer serializer) |
void |
writeRawValue(int pos,
org.apache.flink.table.data.RawValueData<?> input,
RawValueDataSerializer<?> serializer) |
void |
writeRow(int pos,
org.apache.flink.table.data.RowData input,
RowDataSerializer serializer) |
void |
writeShort(int pos,
short value) |
void |
writeString(int pos,
org.apache.flink.table.data.StringData input)
See
BinarySegmentUtils.readStringData(MemorySegment[], int, int, long). |
void |
writeTimestamp(int pos,
org.apache.flink.table.data.TimestampData value,
int precision) |
protected void |
zeroOutPaddingBytes(int numBytes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateValueSetter, writeprotected org.apache.flink.core.memory.MemorySegment segment
protected int cursor
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper outputView
public BinaryArrayWriter(org.apache.flink.table.data.binary.BinaryArrayData array,
int numElements,
int elementSize)
public void reset()
public void setNullBit(int ordinal)
public void setNullBoolean(int ordinal)
public void setNullByte(int ordinal)
public void setNullShort(int ordinal)
public void setNullInt(int ordinal)
public void setNullLong(int ordinal)
public void setNullFloat(int ordinal)
public void setNullDouble(int ordinal)
public void setNullAt(int ordinal)
BinaryWriter@Deprecated public void setNullAt(int pos, org.apache.flink.table.types.logical.LogicalType type)
createNullSetter(LogicalType) for avoiding logical types during runtime.public int getFieldOffset(int pos)
public void setOffsetAndSize(int pos,
int offset,
long size)
public void writeBoolean(int pos,
boolean value)
public void writeByte(int pos,
byte value)
public void writeShort(int pos,
short value)
public void writeInt(int pos,
int value)
public void writeLong(int pos,
long value)
public void writeFloat(int pos,
float value)
public void writeDouble(int pos,
double value)
public void afterGrow()
public void complete()
public int getNumElements()
public static BinaryArrayWriter.NullSetter createNullSetter(org.apache.flink.table.types.logical.LogicalType elementType)
null during runtime.elementType - the element type of the arraypublic void writeString(int pos,
org.apache.flink.table.data.StringData input)
BinarySegmentUtils.readStringData(MemorySegment[], int, int, long).writeString 在接口中 BinaryWriterpublic void writeArray(int pos,
org.apache.flink.table.data.ArrayData input,
ArrayDataSerializer serializer)
writeArray 在接口中 BinaryWriterpublic void writeMap(int pos,
org.apache.flink.table.data.MapData input,
MapDataSerializer serializer)
writeMap 在接口中 BinaryWriterpublic void writeRawValue(int pos,
org.apache.flink.table.data.RawValueData<?> input,
RawValueDataSerializer<?> serializer)
writeRawValue 在接口中 BinaryWriterpublic void writeRow(int pos,
org.apache.flink.table.data.RowData input,
RowDataSerializer serializer)
writeRow 在接口中 BinaryWriterpublic void writeBinary(int pos,
byte[] bytes)
writeBinary 在接口中 BinaryWriterpublic void writeDecimal(int pos,
org.apache.flink.table.data.DecimalData value,
int precision)
writeDecimal 在接口中 BinaryWriterpublic void writeTimestamp(int pos,
org.apache.flink.table.data.TimestampData value,
int precision)
writeTimestamp 在接口中 BinaryWriterprotected void zeroOutPaddingBytes(int numBytes)
protected void ensureCapacity(int neededSize)
protected static int roundNumberOfBytesToNearestWord(int numBytes)
@VisibleForTesting public org.apache.flink.core.memory.MemorySegment getSegments()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.