Class DeltaLakeSchemaSupport
java.lang.Object
io.trino.plugin.deltalake.transactionlog.DeltaLakeSchemaSupport
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanchangeDataFeedEnabled(MetadataEntry metadataEntry) static TypedeserializeType(TypeManager typeManager, Object type, boolean usePhysicalName) static List<ColumnMetadata>extractColumnMetadata(MetadataEntry metadataEntry, TypeManager typeManager) static List<DeltaLakeColumnHandle>extractPartitionColumns(MetadataEntry metadataEntry, TypeManager typeManager) static List<DeltaLakeColumnHandle>extractPartitionColumns(List<DeltaLakeColumnMetadata> schema, List<String> originalPartitionColumns) static List<DeltaLakeColumnMetadata>extractSchema(MetadataEntry metadataEntry, TypeManager typeManager) generateColumnMetadata(DeltaLakeSchemaSupport.ColumnMappingMode columnMappingMode, AtomicInteger maxColumnId) getCheckConstraints(MetadataEntry metadataEntry) getColumnComments(MetadataEntry metadataEntry) getColumnIdentities(MetadataEntry metadataEntry) getColumnInvariants(MetadataEntry metadataEntry) getColumnMappingMode(MetadataEntry metadata) static List<DeltaLakeColumnMetadata>getColumnMetadata(String json, TypeManager typeManager, DeltaLakeSchemaSupport.ColumnMappingMode mappingMode) getColumnProperties(MetadataEntry metadataEntry, Function<com.fasterxml.jackson.databind.JsonNode, T> extractor) getColumnsMetadata(MetadataEntry metadataEntry) getColumnsNullability(MetadataEntry metadataEntry) getColumnTypes(MetadataEntry metadataEntry) getExactColumnNames(MetadataEntry metadataEntry) getGeneratedColumnExpressions(MetadataEntry metadataEntry) static intgetMaxColumnId(MetadataEntry metadata) static booleanisAppendOnly(MetadataEntry metadataEntry) static ObjectserializeColumnType(DeltaLakeSchemaSupport.ColumnMappingMode columnMappingMode, AtomicInteger maxColumnId, Type columnType) static StringserializeSchemaAsJson(List<String> columnNames, Map<String, Object> columnTypes, Map<String, String> columnComments, Map<String, Boolean> columnNullability, Map<String, Map<String, Object>> columnMetadata) static StringserializeStatsAsJson(DeltaLakeFileStatistics fileStatistics) unsupportedReaderFeatures(Set<String> features) static voidvalidateType(Type type) static void
-
Field Details
-
APPEND_ONLY_CONFIGURATION_KEY
- See Also:
-
COLUMN_MAPPING_MODE_CONFIGURATION_KEY
- See Also:
-
COLUMN_MAPPING_PHYSICAL_NAME_CONFIGURATION_KEY
- See Also:
-
MAX_COLUMN_ID_CONFIGURATION_KEY
- See Also:
-
-
Method Details
-
isAppendOnly
-
getColumnMappingMode
-
getMaxColumnId
-
extractPartitionColumns
public static List<DeltaLakeColumnHandle> extractPartitionColumns(MetadataEntry metadataEntry, TypeManager typeManager) -
extractPartitionColumns
public static List<DeltaLakeColumnHandle> extractPartitionColumns(List<DeltaLakeColumnMetadata> schema, List<String> originalPartitionColumns) -
serializeSchemaAsJson
-
serializeColumnType
public static Object serializeColumnType(DeltaLakeSchemaSupport.ColumnMappingMode columnMappingMode, AtomicInteger maxColumnId, Type columnType) -
generateColumnMetadata
public static Map<String,Object> generateColumnMetadata(DeltaLakeSchemaSupport.ColumnMappingMode columnMappingMode, AtomicInteger maxColumnId) -
validateType
-
serializeStatsAsJson
public static String serializeStatsAsJson(DeltaLakeFileStatistics fileStatistics) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
extractColumnMetadata
public static List<ColumnMetadata> extractColumnMetadata(MetadataEntry metadataEntry, TypeManager typeManager) -
extractSchema
public static List<DeltaLakeColumnMetadata> extractSchema(MetadataEntry metadataEntry, TypeManager typeManager) -
verifySupportedColumnMapping
public static void verifySupportedColumnMapping(DeltaLakeSchemaSupport.ColumnMappingMode mappingMode) -
getColumnMetadata
public static List<DeltaLakeColumnMetadata> getColumnMetadata(String json, TypeManager typeManager, DeltaLakeSchemaSupport.ColumnMappingMode mappingMode) -
getColumnTypes
-
getColumnComments
-
getColumnsNullability
-
getColumnIdentities
-
getColumnInvariants
-
getGeneratedColumnExpressions
-
getCheckConstraints
-
changeDataFeedEnabled
-
getColumnsMetadata
-
getColumnProperties
public static <T> Map<String,T> getColumnProperties(MetadataEntry metadataEntry, Function<com.fasterxml.jackson.databind.JsonNode, T> extractor) -
getExactColumnNames
- Returns:
- the case-sensitive column names
-
unsupportedReaderFeatures
-
deserializeType
-