github-advanced-security[bot] commented on code in PR #15953:
URL: https://github.com/apache/druid/pull/15953#discussion_r1537421446


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/results/ExportResultsFrameProcessorFactory.java:
##########
@@ -141,11 +154,45 @@
     );
 
     return new ProcessorsAndChannels<>(
-        ProcessorManagers.of(processors),
+        ProcessorManagers.of(processors)
+                         .withAccumulation(new ArrayList<String>(), (acc, 
file) -> {
+                           ((ArrayList<String>) acc).add((String) file);
+                           return acc;
+                         }),
         OutputChannels.none()
     );
   }
 
+  @Nullable
+  @Override
+  public TypeReference<Object> getResultTypeReference()
+  {
+    return new TypeReference<Object>() {};
+  }
+
+  @Override
+  public Object mergeAccumulatedResult(Object accumulated, Object 
otherAccumulated)
+  {
+    // If a worker does not return a list, fail the query
+    if (!(accumulated instanceof List) || !(otherAccumulated instanceof List)) 
{
+      throw DruidException.forPersona(DruidException.Persona.USER)
+                          .ofCategory(DruidException.Category.RUNTIME_FAILURE)
+                          .build("Expected a list result from worker, received 
[%s] instead. This might be due to workers having an older version.");

Review Comment:
   ## Missing format argument
   
   This format call refers to 1 argument(s) but only supplies 0 argument(s).
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7194)



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