mayankshriv commented on a change in pull request #3868: Disable realtime
aggregate metrics if multi value dimension present
URL: https://github.com/apache/incubator-pinot/pull/3868#discussion_r259551879
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
##########
@@ -715,13 +716,21 @@ private int getOrCreateDocId(Map<String, Object>
dictIdMap) {
}
// All dimension columns should be dictionary encoded.
+ // All dimensions must be single value
for (String dimension : schema.getDimensionNames()) {
if (noDictionaryColumns.contains(dimension)) {
_logger
.warn("Metrics aggregation cannot be turned ON in presence of
no-dictionary dimensions, eg: {}", dimension);
_aggregateMetrics = false;
break;
}
+ // https://github.com/apache/incubator-pinot/issues/3867
+ if (!schema.getDimensionSpec(dimension).isSingleValueField()) {
Review comment:
Well the aggregation code also assumes the metric is single valued, so it
will fail, if I am not wrong. For example, the line below is casting the value
to Integer, and would fail if the value was an int[].
indexReaderWriter.setInt(docId, (Integer) value +
indexReaderWriter.getInt(docId));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]