Skip to content

Commit

Permalink
Validate no delete deltas for a non full ACID table
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jun 14, 2021
1 parent 3538624 commit 54935cb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,12 @@ private ListenableFuture<?> loadPartition(HivePartitionMetadata partition)
// Create a registry of delete_delta directories for the partition
for (AcidUtils.ParsedDelta delta : directory.getCurrentDirectories()) {
if (delta.isDeleteDelta()) {
if (!isFullAcid) {
throw new TrinoException(HIVE_BAD_DATA, format(
"Unexpected delete delta for a non full ACID table '%s'. Would be ignored by the reader: %s",
table.getSchemaTableName(),
delta.getPath()));
}
acidInfoBuilder.addDeleteDelta(delta.getPath());
}
}
Expand Down

0 comments on commit 54935cb

Please sign in to comment.