Package org.apache.iceberg.util
Class ContentFileUtil
java.lang.Object
org.apache.iceberg.util.ContentFileUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsSingleDV(Iterable<DeleteFile> deleteFiles) static <F extends ContentFile<K>,K>
KCopies theContentFilewith the specific stat settings.static StringdvDesc(DeleteFile deleteFile) static booleanisDV(DeleteFile deleteFile) static booleanisFileScoped(DeleteFile deleteFile) static CharSequencereferencedDataFile(DeleteFile deleteFile) static StringreferencedDataFileLocation(DeleteFile deleteFile) static MetricsreplacePathBounds(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.
-
Method Details
-
copy
public static <F extends ContentFile<K>,K> K copy(F file, boolean withStats, Set<Integer> requestedColumnIds) Copies theContentFilewith the specific stat settings.- Parameters:
file- a generic data file to copy.withStats- whether to keep any statsrequestedColumnIds- column ids for which to keep stats. Ifnullthen every column stat is kept.- Returns:
- The copied file
-
referencedDataFile
-
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 replacedsourcePrefix- source prefix which will be replacedtargetPrefix- target prefix which will replace it- Returns:
- metrics for the new delete file entry
-
referencedDataFileLocation
-
isFileScoped
-
isDV
-
containsSingleDV
-
dvDesc
-