Class PropertyUtil

java.lang.Object
org.apache.iceberg.util.PropertyUtil

public class PropertyUtil extends Object
  • Method Details

    • propertyAsBoolean

      public static boolean propertyAsBoolean(Map<String,String> properties, String property, boolean defaultValue)
    • propertyAsNullableBoolean

      public static Boolean propertyAsNullableBoolean(Map<String,String> properties, String property)
    • propertyAsDouble

      public static double propertyAsDouble(Map<String,String> properties, String property, double defaultValue)
    • propertyAsInt

      public static int propertyAsInt(Map<String,String> properties, String property, int defaultValue)
    • propertyAsNullableInt

      public static Integer propertyAsNullableInt(Map<String,String> properties, String property)
    • propertyAsLong

      public static long propertyAsLong(Map<String,String> properties, String property, long defaultValue)
    • propertyAsNullableLong

      public static Long propertyAsNullableLong(Map<String,String> properties, String property)
    • propertyAsString

      public static String propertyAsString(Map<String,String> properties, String property, String defaultValue)
    • propertiesWithPrefix

      public static Map<String,String> propertiesWithPrefix(Map<String,String> properties, String prefix)
      Returns subset of provided map with keys matching the provided prefix. Matching is case-sensitive and the matching prefix is removed from the keys in returned map.
      Parameters:
      properties - input map
      prefix - prefix to choose keys from input map
      Returns:
      subset of input map with keys starting with provided prefix and prefix trimmed out
    • filterProperties

      public static Map<String,String> filterProperties(Map<String,String> properties, Predicate<String> keyPredicate)
      Filter the properties map by the provided key predicate.
      Parameters:
      properties - input map
      keyPredicate - predicate to choose keys from input map
      Returns:
      subset of input map with keys satisfying the predicate
    • applySchemaChanges

      public static Map<String,String> applySchemaChanges(Map<String,String> properties, List<String> deletedColumns, Map<String,String> renamedColumns, Set<String> columnProperties)