gortiz commented on code in PR #10687: URL: https://github.com/apache/pinot/pull/10687#discussion_r1176660467
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java: ########## @@ -637,23 +594,17 @@ private void addNewRow(int docId, GenericRow row) { // Update numValues info indexContainer._valuesInfo.updateSVNumValues(); - MutableForwardIndex forwardIndex = indexContainer._forwardIndex; + MutableIndex forwardIndex = indexContainer._mutableIndexes.get(StandardIndexes.forward()); FieldSpec fieldSpec = indexContainer._fieldSpec; DataType dataType = fieldSpec.getDataType(); value = indexContainer._valueAggregator.getInitialAggregatedValue(value); switch (dataType.getStoredType()) { case INT: - forwardIndex.setInt(docId, ((Number) value).intValue()); - break; case LONG: - forwardIndex.setLong(docId, ((Number) value).longValue()); - break; case FLOAT: - forwardIndex.setFloat(docId, ((Number) value).floatValue()); - break; case DOUBLE: - forwardIndex.setDouble(docId, ((Number) value).doubleValue()); + forwardIndex.add(value, -1, docId); Review Comment: Now forwardIndex is responsible to do the switch. The reason why I keep the switch is to fail in the default case in order to do not break semantics (although I don't know if code actually can fall in the default case here) -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org