Jackie-Jiang commented on code in PR #13572: URL: https://github.com/apache/pinot/pull/13572#discussion_r1719167693
########## pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractorConfig.java: ########## @@ -27,17 +27,27 @@ */ public class AvroRecordExtractorConfig implements RecordExtractorConfig { private boolean _enableLogicalTypes = false; + private boolean _differentiateNullAndEmptyForMV = false; @Override public void init(Map<String, String> props) { _enableLogicalTypes = Boolean.parseBoolean(props.get("enableLogicalTypes")); + _differentiateNullAndEmptyForMV = Boolean.parseBoolean(props.get("differentiateNullAndEmptyForMV")); } public boolean isEnableLogicalTypes() { return _enableLogicalTypes; } + public boolean isDifferentiateNullAndEmptyForMV() { + return _differentiateNullAndEmptyForMV; + } + Review Comment: Keep getter and setter together ########## pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/BaseRecordExtractor.java: ########## @@ -106,7 +108,9 @@ protected Object convertRecord(Object value) { @Nullable protected Object convertMultiValue(Object value) { Collection collection = (Collection) value; - if (collection.isEmpty()) { + if (_differentiateNullAndEmptyForMV && collection.isEmpty()) { + return new Object[0]; + } else if (collection.isEmpty()) { return null; } Review Comment: ```suggestion if (collection.isEmpty()) { return _differentiateNullAndEmptyForMV ? new Object[0] : null; } ``` -- 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