[ 
https://issues.apache.org/jira/browse/DRILL-6310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528304#comment-16528304
 ] 

ASF GitHub Bot commented on DRILL-6310:
---------------------------------------

Ben-Zvi 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_r199289952
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
 ##########
 @@ -694,7 +694,7 @@ public PutStatus put(int incomingRowIdx, IndexPointer 
htIdxHolder, int hashCode,
     }
     htIdxHolder.value = currentIdx;
     return  addedBatch ? PutStatus.NEW_BATCH_ADDED :
-        (freeIndex + 1 > totalIndexSize) ?
+        (freeIndex + 1 > prevIndexSize + 
batchHolders.get(batchHolders.size()-1).getTargetBatchRowCount()) ?
 
 Review comment:
   `prevIndexSize` is used in two places, here and when checking if a new batch 
is needed. Both use it the same way (by adding the size of the last batch). 
Both places are part of the **HOT** code, called for every row.
      So maybe if this variable could be set to include the size of the last 
batch, a lot of computations would be saved.
      Will it be simple?  Need to know the size of the last batch when setting 
this variable.
   

----------------------------------------------------------------
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)

Reply via email to