mcvsubbu commented on a change in pull request #4363: When initializing mutable
dictionary, preserve 20% buffer for cardinality to reduce the chance of
re-sizing the dictionary
URL: https://github.com/apache/incubator-pinot/pull/4363#discussion_r307939214
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
##########
@@ -165,9 +164,11 @@ public long getLatestIngestionTimestamp() {
dictionaryColumnSize = dataType.size();
}
String allocationContext = buildAllocationContext(_segmentName,
column, V1Constants.Dict.FILE_EXTENSION);
+ // NOTE: preserve 20% buffer for cardinality to reduce the chance of
re-sizing the dictionary
+ int estimatedCardinality = (int)
(_statsHistory.getEstimatedCardinality(column) * 1.2);
Review comment:
@Jackie-Jiang I think we should merge this change soon. Do you plan to add a
per0-machine config in this PR or later? Or change to 10%?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]