adarshsanjeev commented on code in PR #17021:
URL: https://github.com/apache/druid/pull/17021#discussion_r1751491550


##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/test/CalciteMSQTestsHelper.java:
##########
@@ -450,6 +452,13 @@ public void close()
       {
       }
     };
-    return () -> new ReferenceCountingResourceHolder<>(segment, 
Closer.create());
+    DataSegment dataSegment = DataSegment.builder()
+                                         .dataSource(segmentId.getDataSource())
+                                         .interval(segmentId.getInterval())
+                                         .version(segmentId.getVersion())
+                                         .shardSpec(new LinearShardSpec(0))
+                                         .size(0)
+                                         .build();
+    return () -> new ReferenceCountingResourceHolder<>(new 
SegmentWithMetadata(dataSegment, segment), Closer.create());

Review Comment:
   Since this is mocking an actual data segment being loaded, this should have 
a non null datasegment, right?



-- 
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