ostinru commented on code in PR #61:
URL: https://github.com/apache/cloudberry-pxf/pull/61#discussion_r2795094954
##########
server/pxf-service/src/main/java/org/apache/cloudberry/pxf/service/controller/ReadServiceImpl.java:
##########
@@ -78,11 +82,26 @@ private OperationResult writeStream(RequestContext context,
OutputStream outputS
OperationStats queryStats = new
OperationStats(OperationStats.Operation.READ, metricsReporter, context);
OperationResult queryResult = new OperationResult();
- // dataStream (and outputStream as the result) will close
automatically at the end of the try block
+ // dataStream (and outputStream as the result) will close
automatically at the
+ // end of the try block
CountingOutputStream countingOutputStream = new
CountingOutputStream(outputStream);
String sourceName = null;
try {
- List<Fragment> fragments =
fragmenterService.getFragmentsForSegment(context);
+ List<Fragment> fragments;
+
+ // Check if a specific fragment index was requested (parallel
execution mode)
+ if (context.hasSpecificFragment()) {
+ // Parallel mode: only process the specified fragment
+ Fragment specificFragment =
fragmenterService.getFragmentByIndex(
+ context, context.getSpecificFragmentIndex());
+ fragments =
java.util.Collections.singletonList(specificFragment);
Review Comment:
NIT: `import java.util.Collections`?
--
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]