@Public public final class RowType extends DataType
Modifier and Type | Class and Description |
---|---|
static class |
RowType.Builder
Builder of
RowType . |
Constructor and Description |
---|
RowType(boolean isNullable,
List<DataField> fields) |
RowType(List<DataField> fields) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(DataTypeVisitor<R> visitor) |
RowType |
appendDataField(String name,
DataType type) |
String |
asSQLString()
Returns a string that summarizes this type as SQL standard string for printing to a console.
|
static RowType.Builder |
builder() |
static RowType.Builder |
builder(boolean isNullable,
AtomicInteger fieldId) |
void |
collectFieldIds(Set<Integer> fieldIds) |
boolean |
containsField(String fieldName) |
DataType |
copy(boolean isNullable)
Returns a deep copy of this type with possibly different nullability.
|
static int |
currentHighestFieldId(List<DataField> fields) |
boolean |
equals(Object o) |
InternalRow.FieldGetter[] |
fieldGetters() |
DataField |
getField(String fieldName) |
int |
getFieldCount() |
int |
getFieldIndex(String fieldName) |
int[] |
getFieldIndices(List<String> projectFields) |
List<String> |
getFieldNames() |
List<DataField> |
getFields() |
List<DataType> |
getFieldTypes() |
DataType |
getTypeAt(int i) |
int |
hashCode() |
boolean |
notContainsField(String fieldName) |
static RowType |
of(DataType... types) |
static RowType |
of(DataType[] types,
String[] names) |
RowType |
project(int[] mapping) |
RowType |
project(List<String> names) |
void |
serializeJson(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonGenerator generator) |
copy, equalsIgnoreNullable, getTypeRoot, is, is, isAnyOf, isAnyOf, isNullable, notNull, nullable, toString, withNullability
public static final String FORMAT
public DataType getTypeAt(int i)
public int getFieldCount()
public int getFieldIndex(String fieldName)
public boolean containsField(String fieldName)
public boolean notContainsField(String fieldName)
public DataType copy(boolean isNullable)
DataType
public String asSQLString()
DataType
asSQLString
in class DataType
public void serializeJson(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
serializeJson
in class DataType
IOException
public <R> R accept(DataTypeVisitor<R> visitor)
public void collectFieldIds(Set<Integer> fieldIds)
collectFieldIds
in class DataType
public RowType project(int[] mapping)
public static RowType.Builder builder()
public static RowType.Builder builder(boolean isNullable, AtomicInteger fieldId)
public InternalRow.FieldGetter[] fieldGetters()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.