public class ProjectedRowData extends Object implements org.apache.flink.table.data.RowData
RowData which provides a projected view of the underlying RowData.
Projection includes both reducing the accessible fields and reordering them.
Note: This class supports only top-level projections, not nested projections.
NOTE: Copied from Flink.
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
static ProjectedRowData |
from(int[] projection)
Create an empty
ProjectedRowData starting from a projection array. |
static ProjectedRowData |
from(int[][] projection)
Like
from(int[]), but throws IllegalArgumentException if the provided projection array contains nested projections, which are not supported by ProjectedRowData. |
static ProjectedRowData |
from(Projection projection)
Create an empty
ProjectedRowData starting from a Projection. |
int |
getArity() |
org.apache.flink.table.data.ArrayData |
getArray(int pos) |
byte[] |
getBinary(int pos) |
boolean |
getBoolean(int pos) |
byte |
getByte(int pos) |
org.apache.flink.table.data.DecimalData |
getDecimal(int pos,
int precision,
int scale) |
double |
getDouble(int pos) |
float |
getFloat(int pos) |
int |
getInt(int pos) |
long |
getLong(int pos) |
org.apache.flink.table.data.MapData |
getMap(int pos) |
<T> org.apache.flink.table.data.RawValueData<T> |
getRawValue(int pos) |
org.apache.flink.table.data.RowData |
getRow(int pos,
int numFields) |
org.apache.flink.types.RowKind |
getRowKind() |
short |
getShort(int pos) |
org.apache.flink.table.data.StringData |
getString(int pos) |
org.apache.flink.table.data.TimestampData |
getTimestamp(int pos,
int precision) |
int |
hashCode() |
boolean |
isNullAt(int pos) |
ProjectedRowData |
replaceRow(org.apache.flink.table.data.RowData row)
Replaces the underlying
RowData backing this ProjectedRowData. |
void |
setRowKind(org.apache.flink.types.RowKind kind) |
String |
toString() |
public ProjectedRowData replaceRow(org.apache.flink.table.data.RowData row)
RowData backing this ProjectedRowData.
This method replaces the row data in place and does not return a new object. This is done for performance reasons.
public int getArity()
getArity 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.types.RowKind getRowKind()
getRowKind 在接口中 org.apache.flink.table.data.RowDatapublic void setRowKind(org.apache.flink.types.RowKind kind)
setRowKind 在接口中 org.apache.flink.table.data.RowDatapublic boolean isNullAt(int pos)
isNullAt 在接口中 org.apache.flink.table.data.RowDatapublic boolean getBoolean(int pos)
getBoolean 在接口中 org.apache.flink.table.data.RowDatapublic byte getByte(int pos)
getByte 在接口中 org.apache.flink.table.data.RowDatapublic short getShort(int pos)
getShort 在接口中 org.apache.flink.table.data.RowDatapublic int getInt(int pos)
getInt 在接口中 org.apache.flink.table.data.RowDatapublic long getLong(int pos)
getLong 在接口中 org.apache.flink.table.data.RowDatapublic float getFloat(int pos)
getFloat 在接口中 org.apache.flink.table.data.RowDatapublic double getDouble(int pos)
getDouble 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.StringData getString(int pos)
getString 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.DecimalData getDecimal(int pos,
int precision,
int scale)
getDecimal 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.TimestampData getTimestamp(int pos,
int precision)
getTimestamp 在接口中 org.apache.flink.table.data.RowDatapublic <T> org.apache.flink.table.data.RawValueData<T> getRawValue(int pos)
getRawValue 在接口中 org.apache.flink.table.data.RowDatapublic byte[] getBinary(int pos)
getBinary 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.ArrayData getArray(int pos)
getArray 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.MapData getMap(int pos)
getMap 在接口中 org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.RowData getRow(int pos,
int numFields)
getRow 在接口中 org.apache.flink.table.data.RowDatapublic static ProjectedRowData from(int[][] projection) throws IllegalArgumentException
from(int[]), but throws IllegalArgumentException if the provided projection array contains nested projections, which are not supported by ProjectedRowData.
The array represents the mapping of the fields of the original DataType, including
nested rows. For example, [[0, 2, 1], ...] specifies to include the 2nd field of the
3rd field of the 1st field in the top-level row.
IllegalArgumentExceptionProjection,
ProjectedRowDatapublic static ProjectedRowData from(int[] projection)
ProjectedRowData starting from a projection array.
The array represents the mapping of the fields of the original DataType. For
example, [0, 2, 1] specifies to include in the following order the 1st field, the 3rd
field and the 2nd field of the row.
Projection,
ProjectedRowDatapublic static ProjectedRowData from(Projection projection)
ProjectedRowData starting from a Projection.
Throws IllegalStateException if the provided projection array contains
nested projections, which are not supported by ProjectedRowData.
Projection,
ProjectedRowDataCopyright © 2019–2022 The Apache Software Foundation. All rights reserved.