[
https://issues.apache.org/jira/browse/DRILL-6310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516686#comment-16516686
]
ASF GitHub Bot commented on DRILL-6310:
---------------------------------------
ilooner commented on a change in pull request #1324: DRILL-6310: limit batch
size for hash aggregate
URL: https://github.com/apache/drill/pull/1324#discussion_r196296167
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableAllocationTracker.java
##########
@@ -46,28 +46,26 @@ protected HashTableAllocationTracker(final HashTableConfig
config,
remainingCapacity = config.getInitialCapacity();
}
- public int getNextBatchHolderSize() {
+ public int getNextBatchHolderSize(int batchSize) {
state = State.ALLOCATION_IN_PROGRESS;
if (!config.getInitialSizeIsFinal()) {
- // We don't know the final size of the hash table, so return the default
max batch holder size
- return maxBatchHolderSize;
+ // We don't know the final size of the hash table, so just return the
batch size.
+ return batchSize;
} else {
// We know the final size of the hash table so we need to compute the
next batch holder size.
-
Preconditions.checkState(remainingCapacity > 0);
- return computeNextBatchHolderSize();
+ return computeNextBatchHolderSize(batchSize);
}
}
- private int computeNextBatchHolderSize() {
- return Math.min(remainingCapacity, maxBatchHolderSize);
+ private int computeNextBatchHolderSize(int batchSize) {
+ return Math.min(batchSize, Math.min(remainingCapacity,
maxBatchHolderSize));
Review comment:
Since we are using batchSize now, we can remove the maxBatchHolderSize field.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> limit batch size for hash aggregate
> -----------------------------------
>
> Key: DRILL-6310
> URL: https://issues.apache.org/jira/browse/DRILL-6310
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Flow
> Affects Versions: 1.13.0
> Reporter: Padma Penumarthy
> Assignee: Padma Penumarthy
> Priority: Major
> Fix For: 1.14.0
>
>
> limit batch size for hash aggregate based on memory.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)