Jackie-Jiang commented on code in PR #11698: URL: https://github.com/apache/pinot/pull/11698#discussion_r1340481197
########## pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java: ########## @@ -73,10 +73,12 @@ public GenericRow extract(GenericRecord from, GenericRow to) { to.putValue(fieldName, value); } } else { + Schema.Field field; + Object value; for (String fieldName : _fields) { - Object value = from.get(fieldName); + field = from.getSchema().getField(fieldName); + value = field == null ? null : from.get(field.pos()); Review Comment: (nit) The declaration can happen inside ```suggestion Schema.Field field = from.getSchema().getField(fieldName); Object value = field == null ? null : from.get(field.pos()); ``` -- 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