T
- Parent schema type.
E.g. Flink DataType or TypeInformation, or Spark DataType.
TO DO: Implement support for String to Timestamp conversion.
https://phabricator.wikimedia.org/T310495
https://phabricator.wikimedia.org/T278467@ParametersAreNonnullByDefault public interface SchemaConversions<T>
Modifier and Type | Interface and Description |
---|---|
static class |
SchemaConversions.RowField<T>
Data Transfer Object wrapper for a 'row field' type.
|
Modifier and Type | Method and Description |
---|---|
T |
typeArray(T elementType,
boolean elementsAreNullable)
Returns type that represents Array.
|
T |
typeBoolean()
Returns type that represents boolean.
|
T |
typeDecimal()
Returns type that represents decimal.
|
T |
typeInteger()
Returns type that represents integer.
|
T |
typeMap(T keyType,
T valueType,
boolean valuesAreNullable)
Returns type that represents Map.
|
T |
typeNull()
Returns type that represents null.
|
T |
typeRow(List<SchemaConversions.RowField<T>> rowFields)
Returns type that represents a row AKA a struct AKA a JSON object.
|
T |
typeString()
Returns type that represents String.
|
T |
typeTimestamp()
Returns type that represents timestamps.
|
@Nonnull T typeMap(T keyType, T valueType, boolean valuesAreNullable)
keyType
- type of the Map keys.valueType
- type of the Map values.valuesAreNullable
- Whether Map values are possibly null.@Nonnull T typeArray(T elementType, boolean elementsAreNullable)
elementType
- type of the Array elements.elementsAreNullable
- Whether Array elements are possibly null.@Nonnull T typeRow(List<SchemaConversions.RowField<T>> rowFields)
rowFields
- List of SchemaConversions.RowField
s in this row. Use these to construct your row type.Copyright © 2025. All rights reserved.