cecemei commented on code in PR #18892:
URL: https://github.com/apache/druid/pull/18892#discussion_r2684549573


##########
processing/src/main/java/org/apache/druid/segment/SegmentReference.java:
##########
@@ -49,23 +51,51 @@ public static SegmentReference missing(SegmentDescriptor 
segmentDescriptor)
     return new SegmentReference(segmentDescriptor, Optional.empty(), null);
   }
 
+  @Nullable
+  private final DataSegment dataSegment;
   private final SegmentDescriptor segmentDescriptor;
   private final Optional<Segment> segmentReference;
   @Nullable
   private final Closeable cleanupHold;
   private final AtomicBoolean closed = new AtomicBoolean(false);
 
+  public SegmentReference(
+      DataSegmentAndDescriptor segment,
+      Optional<Segment> segmentReference,
+      @Nullable Closeable cleanupHold
+  )
+  {
+    this(segment.getDataSegment(), segment.getDescriptor(), segmentReference, 
cleanupHold);
+  }
+
   public SegmentReference(
       SegmentDescriptor segmentDescriptor,
       Optional<Segment> segmentReference,
       @Nullable Closeable cleanupHold
   )
   {
+    this(null, segmentDescriptor, segmentReference, cleanupHold);
+  }
+
+  private SegmentReference(
+      @Nullable DataSegment segment,

Review Comment:
   yea we can probably do this a better way, reverted this change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to