public class AvroSchemaUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADJUST_TO_UTC_PROP |
static java.lang.String |
ELEMENT_ID_PROP |
static java.lang.String |
FIELD_ID_PROP |
static java.lang.String |
ICEBERG_FIELD_NAME_PROP |
static java.lang.String |
KEY_ID_PROP |
static java.lang.String |
VALUE_ID_PROP |
Modifier and Type | Method and Description |
---|---|
static org.apache.avro.Schema |
buildAvroProjection(org.apache.avro.Schema schema,
Schema expected,
java.util.Map<java.lang.String,java.lang.String> renames) |
static Type |
convert(org.apache.avro.Schema schema) |
static org.apache.avro.Schema |
convert(Schema schema,
java.util.Map<Types.StructType,java.lang.String> names) |
static org.apache.avro.Schema |
convert(Schema schema,
java.lang.String tableName) |
static org.apache.avro.Schema |
convert(Type type) |
static org.apache.avro.Schema |
convert(Type type,
java.util.Map<Types.StructType,java.lang.String> names) |
static org.apache.avro.Schema |
convert(Types.StructType type,
java.lang.String name) |
static java.util.Map<Type,org.apache.avro.Schema> |
convertTypes(Types.StructType type,
java.lang.String name) |
static int |
getElementId(org.apache.avro.Schema schema) |
static int |
getFieldId(org.apache.avro.Schema.Field field) |
static int |
getKeyId(org.apache.avro.Schema schema) |
static int |
getValueId(org.apache.avro.Schema schema) |
static boolean |
hasFieldId(org.apache.avro.Schema.Field field) |
static boolean |
isKeyValueSchema(org.apache.avro.Schema schema) |
static boolean |
isOptionSchema(org.apache.avro.Schema schema) |
static boolean |
isTimestamptz(org.apache.avro.Schema schema) |
static java.lang.String |
makeCompatibleName(java.lang.String name) |
static org.apache.avro.Schema |
pruneColumns(org.apache.avro.Schema schema,
java.util.Set<java.lang.Integer> selectedIds,
NameMapping nameMapping) |
static Schema |
toIceberg(org.apache.avro.Schema schema) |
public static final java.lang.String ICEBERG_FIELD_NAME_PROP
public static final java.lang.String FIELD_ID_PROP
public static final java.lang.String KEY_ID_PROP
public static final java.lang.String VALUE_ID_PROP
public static final java.lang.String ELEMENT_ID_PROP
public static final java.lang.String ADJUST_TO_UTC_PROP
public static org.apache.avro.Schema convert(Schema schema, java.lang.String tableName)
public static org.apache.avro.Schema convert(Schema schema, java.util.Map<Types.StructType,java.lang.String> names)
public static org.apache.avro.Schema convert(Type type)
public static org.apache.avro.Schema convert(Types.StructType type, java.lang.String name)
public static org.apache.avro.Schema convert(Type type, java.util.Map<Types.StructType,java.lang.String> names)
public static Type convert(org.apache.avro.Schema schema)
public static Schema toIceberg(org.apache.avro.Schema schema)
public static java.util.Map<Type,org.apache.avro.Schema> convertTypes(Types.StructType type, java.lang.String name)
public static org.apache.avro.Schema pruneColumns(org.apache.avro.Schema schema, java.util.Set<java.lang.Integer> selectedIds, NameMapping nameMapping)
public static org.apache.avro.Schema buildAvroProjection(org.apache.avro.Schema schema, Schema expected, java.util.Map<java.lang.String,java.lang.String> renames)
public static boolean isTimestamptz(org.apache.avro.Schema schema)
public static boolean isOptionSchema(org.apache.avro.Schema schema)
public static boolean isKeyValueSchema(org.apache.avro.Schema schema)
public static int getKeyId(org.apache.avro.Schema schema)
public static int getValueId(org.apache.avro.Schema schema)
public static int getElementId(org.apache.avro.Schema schema)
public static int getFieldId(org.apache.avro.Schema.Field field)
public static boolean hasFieldId(org.apache.avro.Schema.Field field)
public static java.lang.String makeCompatibleName(java.lang.String name)