From b5f117bca2752628acc7b718fe08655d2bf71a7e Mon Sep 17 00:00:00 2001 From: Rohan Garg <7731512+rohangarg@users.noreply.github.com> Date: Thu, 25 Jul 2024 06:55:40 -0400 Subject: [PATCH] Check for tombstones in wrapping storage adapters (#16791) --- .../org/apache/druid/segment/FilteredStorageAdapter.java | 6 ++++++ .../java/org/apache/druid/segment/UnnestStorageAdapter.java | 6 ++++++ .../druid/segment/join/HashJoinSegmentStorageAdapter.java | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/processing/src/main/java/org/apache/druid/segment/FilteredStorageAdapter.java b/processing/src/main/java/org/apache/druid/segment/FilteredStorageAdapter.java index 2b32860698f..1168e34b28a 100644 --- a/processing/src/main/java/org/apache/druid/segment/FilteredStorageAdapter.java +++ b/processing/src/main/java/org/apache/druid/segment/FilteredStorageAdapter.java @@ -142,4 +142,10 @@ public class FilteredStorageAdapter implements StorageAdapter { return baseStorageAdapter.getMetadata(); } + + @Override + public boolean isFromTombstone() + { + return baseStorageAdapter.isFromTombstone(); + } } diff --git a/processing/src/main/java/org/apache/druid/segment/UnnestStorageAdapter.java b/processing/src/main/java/org/apache/druid/segment/UnnestStorageAdapter.java index ff4994210e1..752c6f48678 100644 --- a/processing/src/main/java/org/apache/druid/segment/UnnestStorageAdapter.java +++ b/processing/src/main/java/org/apache/druid/segment/UnnestStorageAdapter.java @@ -256,6 +256,12 @@ public class UnnestStorageAdapter implements StorageAdapter return baseAdapter.getMetadata(); } + @Override + public boolean isFromTombstone() + { + return baseAdapter.isFromTombstone(); + } + public VirtualColumn getUnnestColumn() { return unnestColumn; diff --git a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java index fd9c07a253f..9dade664f8a 100644 --- a/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java +++ b/processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java @@ -227,6 +227,12 @@ public class HashJoinSegmentStorageAdapter implements StorageAdapter return clauses.isEmpty() && baseAdapter.canVectorize(baseFilterAnd(filter), virtualColumns, descending); } + @Override + public boolean isFromTombstone() + { + return baseAdapter.isFromTombstone(); + } + @Nullable @Override public VectorCursor makeVectorCursor(