github-advanced-security[bot] commented on code in PR #18054:
URL: https://github.com/apache/druid/pull/18054#discussion_r2116334470
##########
server/src/test/java/org/apache/druid/server/TestClusterQuerySegmentWalker.java:
##########
@@ -228,29 +231,39 @@
return new NoopQueryRunner<>();
}
- return new FinalizeResultsQueryRunner<>(
- toolChest.mergeResults(
- factory.mergeRunners(
- Execs.directExecutor(),
- FunctionalIterable
- .create(segmentsList)
- .transform(
- segment ->
- new SpecificSegmentQueryRunner<>(
- new ReferenceCountingSegmentQueryRunner<>(
- factory,
- segment.getSegment(),
- segmentMapFn,
- segment.getDescriptor()
- ),
- new
SpecificSegmentSpec(segment.getDescriptor())
- )
- )
- ),
- true
- ),
- toolChest
- );
+ return new QueryRunner<T>()
+ {
+ @Override
+ public Sequence<T> run(QueryPlus<T> queryPlus, ResponseContext
responseContext)
+ {
+ final Closer closer = Closer.create();
+ try {
+ QueryRunner<T> runner = new FinalizeResultsQueryRunner<>(
+ toolChest.mergeResults(
+ factory.mergeRunners(
+ Execs.directExecutor(),
+ FunctionalIterable
+ .create(segmentsList)
+ .transform(
+ segment ->
+ new SpecificSegmentQueryRunner<>(
+
factory.createRunner(closer.register(segmentMapFn.apply(segment.getSegment())
+
.orElseThrow())),
+ new
SpecificSegmentSpec(segment.getDescriptor())
+ )
+ )
+ ),
Review Comment:
## Deprecated method or constructor invocation
Invoking [QueryRunnerFactory.mergeRunners](1) should be avoided because it
has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/9205)
--
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]