tarun11Mavani commented on code in PR #16113: URL: https://github.com/apache/pinot/pull/16113#discussion_r2151774446
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ComplexTypeTransformer.java: ########## @@ -179,20 +184,25 @@ public List<String> getInputColumns() { @Override public GenericRow transform(GenericRow record) { try { - GenericRow originalRow = _fieldsToUnnest.isEmpty() ? null : record.copy(_fieldsToUnnest); - flattenMap(record, new ArrayList<>(record.getFieldToValueMap().keySet())); - for (String field : _fieldsToUnnest) { - unnestCollection(record, field); - } - Object unnestedRows = record.getValue(GenericRow.MULTIPLE_RECORDS_KEY); - if (originalRow != null && unnestedRows instanceof Collection) { - for (GenericRow unnestedRow : (Collection<GenericRow>) unnestedRows) { - for (String field : _fieldsToUnnest) { - unnestedRow.putValue(field, originalRow.getValue(field)); + if (_retainOriginalFieldInUnnest) { Review Comment: I think this will be a backward incompatible change. The existing users will have to modify their table config to add this field if they want to retain the original fields. It would be good to call out the impact of this. -- 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