@Internal public class EnrichedRowData extends Object implements org.apache.flink.table.data.RowData
RowData which is backed by two RowData with a well-defined
index mapping, One of the rows is fixed, while the other can be swapped for performant changes in
hot code paths. The RowKind is inherited from the mutable row.| Constructor and Description |
|---|
EnrichedRowData(org.apache.flink.table.data.RowData fixedRow,
int[] indexMapping) |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
computeIndexMapping(List<String> producedRowFields,
List<String> mutableRowFields,
List<String> fixedRowFields)
This method computes the index mapping for
EnrichedRowData. |
boolean |
equals(Object o) |
static EnrichedRowData |
from(org.apache.flink.table.data.RowData fixedRow,
List<String> producedRowFields,
List<String> mutableRowFields,
List<String> fixedRowFields)
Creates a new
EnrichedRowData with the provided fixedRow as the immutable
static row, and uses the producedRowFields, fixedRowFields and mutableRowFields arguments to compute the indexes mapping. |
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) |
EnrichedRowData |
replaceMutableRow(org.apache.flink.table.data.RowData mutableRow)
Replaces the mutable
RowData backing this EnrichedRowData. |
void |
setRowKind(org.apache.flink.types.RowKind kind) |
String |
toString() |
public EnrichedRowData(org.apache.flink.table.data.RowData fixedRow,
int[] indexMapping)
public EnrichedRowData replaceMutableRow(org.apache.flink.table.data.RowData mutableRow)
RowData backing this EnrichedRowData.
This method replaces the mutable row data in place and does not return a new object. This is done for performance reasons.
public int getArity()
getArity in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.types.RowKind getRowKind()
getRowKind in interface org.apache.flink.table.data.RowDatapublic void setRowKind(org.apache.flink.types.RowKind kind)
setRowKind in interface org.apache.flink.table.data.RowDatapublic boolean isNullAt(int pos)
isNullAt in interface org.apache.flink.table.data.RowDatapublic boolean getBoolean(int pos)
getBoolean in interface org.apache.flink.table.data.RowDatapublic byte getByte(int pos)
getByte in interface org.apache.flink.table.data.RowDatapublic short getShort(int pos)
getShort in interface org.apache.flink.table.data.RowDatapublic int getInt(int pos)
getInt in interface org.apache.flink.table.data.RowDatapublic long getLong(int pos)
getLong in interface org.apache.flink.table.data.RowDatapublic float getFloat(int pos)
getFloat in interface org.apache.flink.table.data.RowDatapublic double getDouble(int pos)
getDouble in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.StringData getString(int pos)
getString in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.DecimalData getDecimal(int pos,
int precision,
int scale)
getDecimal in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.TimestampData getTimestamp(int pos,
int precision)
getTimestamp in interface org.apache.flink.table.data.RowDatapublic <T> org.apache.flink.table.data.RawValueData<T> getRawValue(int pos)
getRawValue in interface org.apache.flink.table.data.RowDatapublic byte[] getBinary(int pos)
getBinary in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.ArrayData getArray(int pos)
getArray in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.MapData getMap(int pos)
getMap in interface org.apache.flink.table.data.RowDatapublic org.apache.flink.table.data.RowData getRow(int pos,
int numFields)
getRow in interface org.apache.flink.table.data.RowDatapublic static EnrichedRowData from(org.apache.flink.table.data.RowData fixedRow, List<String> producedRowFields, List<String> mutableRowFields, List<String> fixedRowFields)
EnrichedRowData with the provided fixedRow as the immutable
static row, and uses the producedRowFields, fixedRowFields and mutableRowFields arguments to compute the indexes mapping.
The producedRowFields should include the name of fields of the full row once
mutable and fixed rows are merged, while fixedRowFields and mutableRowFields
should contain respectively the field names of fixed row and mutable row. All the lists are
ordered with indexes matching the position of the field in the row. As an example, for a
complete row (a, b, c) the mutable row might be (a, c) and the fixed row
might be (b)
public static int[] computeIndexMapping(List<String> producedRowFields, List<String> mutableRowFields, List<String> fixedRowFields)
EnrichedRowData.from(RowData, List, List, List)Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.