github-code-scanning[bot] commented on code in PR #15071:
URL: https://github.com/apache/druid/pull/15071#discussion_r1344430952


##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregations.java:
##########
@@ -57,6 +58,30 @@
    * @return list of expressions corresponding to aggregator arguments, or 
null if any cannot be translated
    */
   @Nullable
+  public static List<DruidExpression> getArgumentsForSimpleAggregator(
+      final RexBuilder rexBuilder,

Review Comment:
   ## Useless parameter
   
   The parameter 'rexBuilder' is never used.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5845)



##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/SqlAggregator.java:
##########
@@ -62,7 +63,29 @@
    * @return aggregation, or null if the call cannot be translated
    */
   @Nullable
-  Aggregation toDruidAggregation(
+  default Aggregation toDruidAggregation(
+      PlannerContext plannerContext,
+      RowSignature rowSignature,
+      VirtualColumnRegistry virtualColumnRegistry,
+      RexBuilder rexBuilder,
+      String name,
+      AggregateCall aggregateCall,
+      InputAccessor inputAccessor,
+      List<Aggregation> existingAggregations,
+      boolean finalizeAggregations
+  ) {
+    return toDruidAggregation(plannerContext,
+        rowSignature,
+        virtualColumnRegistry,
+        rexBuilder,
+        name,
+        aggregateCall,
+        inputAccessor.getProject(),

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



##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/GroupingSqlAggregator.java:
##########
@@ -58,17 +59,17 @@
       RexBuilder rexBuilder,
       String name,
       AggregateCall aggregateCall,
-      Project project,
-      List<Aggregation> existingAggregations,
-      boolean finalizeAggregations
+      final InputAccessor inputAccessor,
+      final List<Aggregation> existingAggregations,
+      final boolean finalizeAggregations
   )
   {
     List<String> arguments = aggregateCall.getArgList()
                                           .stream()
                                           .map(i -> getColumnName(
                                               plannerContext,
                                               rowSignature,
-                                              project,
+                                              inputAccessor.getProject(),

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



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