clintropolis commented on code in PR #15434:
URL: https://github.com/apache/druid/pull/15434#discussion_r1407001862
##########
processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyVectorAggregator.java:
##########
@@ -78,7 +84,23 @@ public void aggregate(ByteBuffer buf, int position, int
startRow, int endRow)
if (startRow < rows.length) {
IndexedInts row = rows[startRow];
@Nullable
- String foundValue = row.size() == 0 ? null :
multiValueSelector.lookupName(row.get(0));
+ String foundValue;
+ if (row.size() == 0) {
+ foundValue = null;
+ } else if (aggregateMultipleValues) {
+ if (row.size() > 1) {
+ List<String> arrayList = new ArrayList<>();
+ row.forEach(rowIndex -> {
+ String chopped =
StringUtils.fastLooseChop(multiValueSelector.lookupName(rowIndex),
maxStringBytes);
Review Comment:
that's fine i think, i don't really like the silent truncation at all
personally; i think we should probably change first/last/any to all optionally
fail instead of silently truncating results, but that doesn't need to changed
now.
--
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]