npawar commented on a change in pull request #6046: URL: https://github.com/apache/incubator-pinot/pull/6046#discussion_r502595891
########## File path: pinot-plugins/pinot-input-format/pinot-csv/src/main/java/org/apache/pinot/plugin/inputformat/csv/CSVRecordReader.java ########## @@ -95,8 +95,13 @@ public void init(File dataFile, Set<String> fieldsToRead, @Nullable RecordReader _recordExtractor = new CSVRecordExtractor(); CSVRecordExtractorConfig recordExtractorConfig = new CSVRecordExtractorConfig(); recordExtractorConfig.setMultiValueDelimiter(multiValueDelimiter); - _recordExtractor.init(fieldsToRead, recordExtractorConfig); + init(); + + if (fieldsToRead == null || fieldsToRead.isEmpty()) { Review comment: i see that in CSV case where fieldsToRead is null, we get fields to read in the RecordReader. Versus, in the JSON/AVRO case we used to make that decision inside the RecordExtractor. Is it possible to keep these consistent and always let the RecordExtractor make this decision? ---------------------------------------------------------------- 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