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


##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/ClientCompactionTaskQuerySerdeTest.java:
##########
@@ -290,6 +292,10 @@
         query.getMetricsSpec(),
         task.getMetricsSpec()
     );
+    Assert.assertEquals(
+        query.getClientCompactionRunnerInfo().getType().toString(),
+        task.getCompactionRunner().getType().toString()

Review Comment:
   ## Useless toString on String
   
   Redundant call to 'toString' on a String object.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7400)



##########
server/src/main/java/org/apache/druid/server/coordinator/DataSourceCompactionConfig.java:
##########
@@ -209,9 +225,41 @@
         dimensionsSpec,
         transformSpec,
         ioConfig,
-        taskContext
+        taskContext,
+        compactionEngine
     );
     result = 31 * result + Arrays.hashCode(metricsSpec);
     return result;
   }
+
+  public static DataSourceCompactionConfig from(
+      DataSourceCompactionConfig newConfig,
+      CompactionEngine defaultCompactionEngine
+  )
+  {
+    CompactionEngine newCompactionEngine = newConfig.getEngine();
+    String engineSource = "specified in spec";
+    if (newCompactionEngine == null) {
+      newCompactionEngine = defaultCompactionEngine;
+      engineSource = "set as default";
+      newConfig = new DataSourceCompactionConfig(
+          newConfig.getDataSource(),
+          newConfig.getTaskPriority(),
+          newConfig.getInputSegmentSizeBytes(),
+          newConfig.getMaxRowsPerSegment(),

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DataSourceCompactionConfig.getMaxRowsPerSegment](1) should be 
avoided because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7398)



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