kishoreg commented on a change in pull request #5484: URL: https://github.com/apache/incubator-pinot/pull/5484#discussion_r434773777
########## File path: pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java ########## @@ -39,10 +42,15 @@ public void init(Set<String> fields, @Nullable RecordExtractorConfig recordExtra @Override public GenericRow extract(GenericRecord from, GenericRow to) { - for (String fieldName : _fields) { - Object value = from.get(fieldName); - Object convertedValue = AvroUtils.convert(value); - to.putValue(fieldName, convertedValue); + if (_fields == null || _fields.isEmpty()) { // extract all Review comment: update the javadoc for streamdecoder with the new contract ########## File path: pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java ########## @@ -39,10 +42,15 @@ public void init(Set<String> fields, @Nullable RecordExtractorConfig recordExtra @Override public GenericRow extract(GenericRecord from, GenericRow to) { - for (String fieldName : _fields) { - Object value = from.get(fieldName); - Object convertedValue = AvroUtils.convert(value); - to.putValue(fieldName, convertedValue); + if (_fields == null || _fields.isEmpty()) { // extract all Review comment: since we know this in the init, can we set a final boolean _extractAll? jvm might be able to optimize it. ---------------------------------------------------------------- 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. 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