Jackie-Jiang commented on code in PR #16454:
URL: https://github.com/apache/pinot/pull/16454#discussion_r2243907626
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGenerator.java:
##########
@@ -101,7 +101,19 @@ public class DictionaryBasedGroupKeyGenerator implements
GroupKeyGenerator {
private final int _globalGroupIdUpperBound;
private final RawKeyHolder _rawKeyHolder;
+ private final HolderType _usedHolderType;
Review Comment:
We can make `RawKeyHolder` extends `AutoCloseable`, and make this cleanup
logic in `close()`. We don't need to maintain the `HolderType` here
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/groupby/AggregationGroupByResult.java:
##########
@@ -51,6 +51,15 @@ public Iterator<GroupKeyGenerator.GroupKey>
getGroupKeyIterator() {
return _groupKeyGenerator.getGroupKeys();
}
+ /**
+ * Clear and trim DictionaryBasedGroupKeyGenerator after use
+ */
+ public void clearAndTrimGroupKeyGenerator() {
Review Comment:
We don't need to make it so specific. We can make this class extend
`AutoCloseable` and model this as cleanup for `close()`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]