Class ContentFileUtil

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

public class ContentFileUtil extends Object
  • Method Details

    • copy

      public static <F extends ContentFile<K>, K> K copy(F file, boolean withStats, Set<Integer> requestedColumnIds)
      Copies the ContentFile with the specific stat settings.
      Parameters:
      file - a generic data file to copy.
      withStats - whether to keep any stats
      requestedColumnIds - column ids for which to keep stats. If null then every column stat is kept.
      Returns:
      The copied file
    • referencedDataFile

      public static CharSequence referencedDataFile(DeleteFile deleteFile)
    • replacePathBounds

      public static Metrics replacePathBounds(DeleteFile deleteFile, String sourcePrefix, String targetPrefix)
      Replace file_path reference for a delete file manifest entry, if file_path field's lower_bound and upper_bound metrics are equal. Else clear file_path lower and upper bounds.
      Parameters:
      deleteFile - delete file whose entry will be replaced
      sourcePrefix - source prefix which will be replaced
      targetPrefix - target prefix which will replace it
      Returns:
      metrics for the new delete file entry
    • referencedDataFileLocation

      public static String referencedDataFileLocation(DeleteFile deleteFile)
    • isFileScoped

      public static boolean isFileScoped(DeleteFile deleteFile)
    • isDV

      public static boolean isDV(DeleteFile deleteFile)
    • containsSingleDV

      public static boolean containsSingleDV(Iterable<DeleteFile> deleteFiles)
    • dvDesc

      public static String dvDesc(DeleteFile deleteFile)