Package io.trino.plugin.iceberg
Class IcebergUtil
java.lang.Object
io.trino.plugin.iceberg.IcebergUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanEnforceColumnConstraintInSpecs(TypeOperators typeOperators, org.apache.iceberg.Table table, Set<Integer> partitionSpecIds, IcebergColumnHandle columnHandle, Domain domain) static ObjectdeserializePartitionValue(Type type, String valueString, String name) static IcebergColumnHandlegetColumnHandle(org.apache.iceberg.types.Types.NestedField column, TypeManager typeManager) static List<IcebergColumnHandle>getColumns(org.apache.iceberg.Schema schema, TypeManager typeManager) static IcebergFileFormatgetFileFormat(Map<String, String> storageProperties) static IcebergFileFormatgetFileFormat(org.apache.iceberg.Table table) getIcebergTableProperties(org.apache.iceberg.Table icebergTable) static org.apache.iceberg.TablegetIcebergTableWithMetadata(TrinoCatalog catalog, IcebergTableOperationsProvider tableOperationsProvider, ConnectorSession session, SchemaTableName table, org.apache.iceberg.TableMetadata tableMetadata) getIdentityPartitions(org.apache.iceberg.PartitionSpec partitionSpec) static org.apache.iceberg.io.LocationProvidergetLocationProvider(SchemaTableName schemaTableName, String tableLocation, Map<String, String> storageProperties) getPartitionKeys(org.apache.iceberg.FileScanTask scanTask) Returns a map from fieldId to serialized partition value containing entries for all identity partitions.getPartitionKeys(org.apache.iceberg.StructLike partition, org.apache.iceberg.PartitionSpec spec) static longgetSnapshotIdAsOfTime(org.apache.iceberg.Table table, long epochMillis) getTableComment(org.apache.iceberg.Table table) static booleanisIcebergTable(Table table) static org.apache.iceberg.TableloadIcebergTable(TrinoCatalog catalog, IcebergTableOperationsProvider tableOperationsProvider, ConnectorSession session, SchemaTableName table) static org.apache.iceberg.TransactionnewCreateTableTransaction(TrinoCatalog catalog, ConnectorTableMetadata tableMetadata, ConnectorSession session) primitiveFieldTypes(org.apache.iceberg.Schema schema) static Stringstatic longresolveSnapshotId(org.apache.iceberg.Table table, long snapshotId, boolean allowLegacySnapshotSyntax) Deprecated.static org.apache.iceberg.SchemaschemaFromHandles(List<IcebergColumnHandle> columns) static org.apache.iceberg.SchemaschemaFromMetadata(List<ColumnMetadata> columns) static voidvalidateTableCanBeDropped(org.apache.iceberg.Table table)
-
Method Details
-
isIcebergTable
-
loadIcebergTable
public static org.apache.iceberg.Table loadIcebergTable(TrinoCatalog catalog, IcebergTableOperationsProvider tableOperationsProvider, ConnectorSession session, SchemaTableName table) -
getIcebergTableWithMetadata
public static org.apache.iceberg.Table getIcebergTableWithMetadata(TrinoCatalog catalog, IcebergTableOperationsProvider tableOperationsProvider, ConnectorSession session, SchemaTableName table, org.apache.iceberg.TableMetadata tableMetadata) -
getIcebergTableProperties
-
resolveSnapshotId
@Deprecated public static long resolveSnapshotId(org.apache.iceberg.Table table, long snapshotId, boolean allowLegacySnapshotSyntax) Deprecated. -
getColumns
public static List<IcebergColumnHandle> getColumns(org.apache.iceberg.Schema schema, TypeManager typeManager) -
getColumnHandle
public static IcebergColumnHandle getColumnHandle(org.apache.iceberg.types.Types.NestedField column, TypeManager typeManager) -
schemaFromHandles
-
getIdentityPartitions
-
primitiveFieldTypes
-
getFileFormat
-
getFileFormat
-
getTableComment
-
quotedTableName
-
canEnforceColumnConstraintInSpecs
public static boolean canEnforceColumnConstraintInSpecs(TypeOperators typeOperators, org.apache.iceberg.Table table, Set<Integer> partitionSpecIds, IcebergColumnHandle columnHandle, Domain domain) -
deserializePartitionValue
-
getPartitionKeys
public static Map<Integer,Optional<String>> getPartitionKeys(org.apache.iceberg.FileScanTask scanTask) Returns a map from fieldId to serialized partition value containing entries for all identity partitions.nullpartition values are represented withOptional.empty(). -
getPartitionKeys
-
getLocationProvider
public static org.apache.iceberg.io.LocationProvider getLocationProvider(SchemaTableName schemaTableName, String tableLocation, Map<String, String> storageProperties) -
schemaFromMetadata
-
newCreateTableTransaction
public static org.apache.iceberg.Transaction newCreateTableTransaction(TrinoCatalog catalog, ConnectorTableMetadata tableMetadata, ConnectorSession session) -
getSnapshotIdAsOfTime
public static long getSnapshotIdAsOfTime(org.apache.iceberg.Table table, long epochMillis) -
validateTableCanBeDropped
public static void validateTableCanBeDropped(org.apache.iceberg.Table table)
-