github-advanced-security[bot] commented on code in PR #19753:
URL: https://github.com/apache/druid/pull/19753#discussion_r3651197658
##########
processing/src/main/java/org/apache/druid/segment/projections/MergingColumnSelectorFactory.java:
##########
@@ -109,9 +146,17 @@
@Override
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec)
{
+ final int clusteringIdx =
clusteringConstantIndex(dimensionSpec.getDimension());
final DimensionSelector[] perGroup = new
DimensionSelector[groupFactories.length];
for (int i = 0; i < groupFactories.length; i++) {
- if (groupFactories[i] != null) {
+ if (clusteringIdx >= 0) {
+ // Clustering column: the winning group's constant value, decorated
with any extraction fn.
+ final Object value = clusteringValuesByGroup.get(i)[clusteringIdx];
+ perGroup[i] = DimensionSelector.constant(
+ value == null ? null : String.valueOf(value),
+ dimensionSpec.getExtractionFn()
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [DimensionSpec.getExtractionFn](1) should be avoided because it has
been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11368)
--
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]