Package io.deephaven.iceberg.base
Class IcebergUtils
java.lang.Object
io.deephaven.iceberg.base.IcebergUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancreateNamespaceIfNotExists(@NotNull org.apache.iceberg.catalog.Catalog catalog, @NotNull org.apache.iceberg.catalog.Namespace namespace) static URIdataFileUri(@NotNull org.apache.iceberg.Table table, @NotNull org.apache.iceberg.DataFile dataFile) static booleandeephavenNullOrderMatchesIceberg(@NotNull org.apache.iceberg.SortDirection direction, @NotNull org.apache.iceberg.NullOrder nullOrder) Whether Deephaven places nulls wherenullOrderdoes in a sort indirection.static booleandeephavenOrderMatchesIceberg(@NotNull org.apache.iceberg.SortDirection direction, @NotNull org.apache.iceberg.NullOrder nullOrder, @NotNull Class<?> dataType, @NotNull org.apache.iceberg.types.Type icebergType) Whether Deephaven, sorting a column ofdataTypeindirection, orders the column's values and nulls as the Iceberg specification orders a field oficebergTypewithdirectionandnullOrder.static booleandropNamespaceIfExists(@NotNull org.apache.iceberg.catalog.Catalog catalog, @NotNull org.apache.iceberg.catalog.Namespace namespace) static URIlocationUri(@NotNull org.apache.iceberg.Table table) static StringmaybeResolveRelativePath(@NotNull String path, @NotNull org.apache.iceberg.io.FileIO io) static voidverifyPartitioningColumns(@NotNull org.apache.iceberg.PartitionSpec tablePartitionSpec, @NotNull TableDefinition tableDefinition) Check that all the partitioning columns from the partition spec are of supported types and are present in the Table Definition.static voidverifyRequiredFields(org.apache.iceberg.Schema tableSchema, TableDefinition tableDefinition) Check that all required fields are present in the table definition
-
Constructor Details
-
IcebergUtils
public IcebergUtils()
-
-
Method Details
-
maybeResolveRelativePath
-
locationUri
-
dataFileUri
public static URI dataFileUri(@NotNull @NotNull org.apache.iceberg.Table table, @NotNull @NotNull org.apache.iceberg.DataFile dataFile) -
createNamespaceIfNotExists
public static boolean createNamespaceIfNotExists(@NotNull @NotNull org.apache.iceberg.catalog.Catalog catalog, @NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) -
dropNamespaceIfExists
public static boolean dropNamespaceIfExists(@NotNull @NotNull org.apache.iceberg.catalog.Catalog catalog, @NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) -
verifyRequiredFields
public static void verifyRequiredFields(org.apache.iceberg.Schema tableSchema, TableDefinition tableDefinition) Check that all required fields are present in the table definition -
verifyPartitioningColumns
public static void verifyPartitioningColumns(@NotNull @NotNull org.apache.iceberg.PartitionSpec tablePartitionSpec, @NotNull @NotNull TableDefinition tableDefinition) Check that all the partitioning columns from the partition spec are of supported types and are present in the Table Definition. -
deephavenNullOrderMatchesIceberg
public static boolean deephavenNullOrderMatchesIceberg(@NotNull @NotNull org.apache.iceberg.SortDirection direction, @NotNull @NotNull org.apache.iceberg.NullOrder nullOrder) Whether Deephaven places nulls wherenullOrderdoes in a sort indirection. Deephaven orders null before every value, so nulls come first in an ascending sort and last in a descending one. -
deephavenOrderMatchesIceberg
public static boolean deephavenOrderMatchesIceberg(@NotNull @NotNull org.apache.iceberg.SortDirection direction, @NotNull @NotNull org.apache.iceberg.NullOrder nullOrder, @NotNull @NotNull Class<?> dataType, @NotNull @NotNull org.apache.iceberg.types.Type icebergType) Whether Deephaven, sorting a column ofdataTypeindirection, orders the column's values and nulls as the Iceberg specification orders a field oficebergTypewithdirectionandnullOrder. Nulls must be placed asdeephavenNullOrderMatchesIceberg(SortDirection, NullOrder)describes. Values are ordered alike for booleans, integers, dates, times and timestamps. Values are ordered differently for strings, which Deephaven compares by UTF-16 code unit and the specification by code point, and for floating point values, where Deephaven treats-0.0and0.0as equal and orders every NaN last, but the specification orders-0.0before0.0and a negative NaN first. Every other type is reported as ordered differently: Deephaven does not read the type, or the two orderings have not been compared.A sort field's transform is not considered: the caller decides which transforms a sort by column values honors.
-