You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org> on 2023/03/26 11:31:27 UTC

[GitHub] [druid] github-code-scanning[bot] commented on a diff in pull request #13014: Add support for using multiple columns in a distinct count sql aggregation

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


##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BuiltinApproxCountDistinctSqlAggregator.java:
##########
@@ -82,27 +84,26 @@
       final boolean finalizeAggregations
   )
   {
-    // Don't use Aggregations.getArgumentsForSimpleAggregator, since it won't let us use direct column access
-    // for string columns.
-    final RexNode rexNode = Expressions.fromFieldAccess(
-        rexBuilder.getTypeFactory(),
-        rowSignature,
-        project,
-        Iterables.getOnlyElement(aggregateCall.getArgList())
-    );
+    final String aggregatorName = finalizeAggregations ? Calcites.makePrefixedName(name, "a") : name;
+    final List<DimensionSpec> specs = new ArrayList<>();
+    final List<DimFilter> nonNullFilterList = new ArrayList<>();

Review Comment:
   ## Unread local variable
   
   Variable 'List<DimFilter> nonNullFilterList' is never read.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4486)



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org