zhtaoxiang commented on code in PR #13636: URL: https://github.com/apache/pinot/pull/13636#discussion_r1717988514
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/UpsertUtils.java: ########## @@ -141,48 +141,10 @@ public void close() throws IOException { _primaryKeyReader.close(); _comparisonColumnReader.close(); - } - } - - public static class PrimaryKeyReader implements Closeable { - public final List<PinotSegmentColumnReader> _primaryKeyColumnReaders; - - public PrimaryKeyReader(IndexSegment segment, List<String> primaryKeyColumns) { - _primaryKeyColumnReaders = new ArrayList<>(primaryKeyColumns.size()); - for (String primaryKeyColumn : primaryKeyColumns) { - _primaryKeyColumnReaders.add(new PinotSegmentColumnReader(segment, primaryKeyColumn)); - } - } - - public PrimaryKey getPrimaryKey(int docId) { - int numPrimaryKeys = _primaryKeyColumnReaders.size(); - Object[] values = new Object[numPrimaryKeys]; - for (int i = 0; i < numPrimaryKeys; i++) { - values[i] = getValue(_primaryKeyColumnReaders.get(i), docId); - } - return new PrimaryKey(values); - } - - public void getPrimaryKey(int docId, PrimaryKey buffer) { - Object[] values = buffer.getValues(); - int numPrimaryKeys = values.length; - for (int i = 0; i < numPrimaryKeys; i++) { - values[i] = getValue(_primaryKeyColumnReaders.get(i), docId); + if (_deleteRecordColumnReader != null) { + _deleteRecordColumnReader.close(); Review Comment: yes, this was missed 😛 ########## pinot-spi/src/main/java/org/apache/pinot/spi/config/table/DedupConfig.java: ########## @@ -20,25 +20,45 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import java.util.Map; import org.apache.pinot.spi.config.BaseJsonConfig; public class DedupConfig extends BaseJsonConfig { + @JsonPropertyDescription("Whether dedup is enabled or not.") private final boolean _dedupEnabled; + @JsonPropertyDescription("Function to hash the primary key.") private final HashFunction _hashFunction; + @JsonPropertyDescription("Custom class for dedup metadata manager.") private final String _metadataManagerClass; + @JsonPropertyDescription("Custom configs for dedup metadata manager") + private final Map<String, String> _metadataManagerConfigs; + @JsonPropertyDescription("When larger than 0, use it for dedup metadata cleanup, it uses the same unit as the " + + "metadata time column. The metadata will be cleaned up when the metadata time is older than the current time " Review Comment: goog catch, forgot to update here. -- 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