Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ private VectorizedOrcAcidRowBatchReader(JobConf conf, OrcSplit orcSplit, Reporte
if (deleteEventRegistry.isEmpty() && !rowIdProjected) {
Path parent = orcSplit.getPath().getParent();
while (parent != null && !rootPath.equals(parent)) {
if (parent.getName().startsWith(AcidUtils.BASE_PREFIX)) {
String parentName = parent.getName();
if (parentName.startsWith(AcidUtils.BASE_PREFIX)) {
/**
* The assumption here is that any base_x is filtered out by
* {@link AcidUtils#getAcidState(Path, Configuration, ValidWriteIdList)}
Expand All @@ -351,7 +352,8 @@ private VectorizedOrcAcidRowBatchReader(JobConf conf, OrcSplit orcSplit, Reporte
*/
readerOptions.includeAcidColumns(false);
break;
} else {
} else if (parentName.startsWith(AcidUtils.DELTA_PREFIX)
|| parentName.startsWith(AcidUtils.DELETE_DELTA_PREFIX)) {
ParsedDeltaLight pd = ParsedDeltaLight.parse(parent);
if (validWriteIdList.isWriteIdRangeValid(pd.getMinWriteId(),
pd.getMaxWriteId()) == ValidWriteIdList.RangeResponse.ALL) {
Expand All @@ -361,6 +363,11 @@ private VectorizedOrcAcidRowBatchReader(JobConf conf, OrcSplit orcSplit, Reporte
break;
}
}
// Any other directory name (e.g. HIVE_UNION_SUBDIR_<N>/ produced by
// an INSERT ... UNION ALL against a table that was later converted
// to full ACID) is not an ACID container — skip it and keep walking
// up. Feeding such a name into ParsedDeltaLight.parse would throw
// NumberFormatException.
parent = parent.getParent();
}
}
Expand Down
Loading
Loading