GWphua commented on code in PR #18731:
URL: https://github.com/apache/druid/pull/18731#discussion_r2689501742


##########
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/SpillingGrouper.java:
##########
@@ -68,7 +68,7 @@ public class SpillingGrouper<KeyType> implements 
Grouper<KeyType>
       "Not enough disk space to execute this query. Try raising 
druid.query.groupBy.maxOnDiskStorage."
   );
 
-  private final Grouper<KeyType> grouper;
+  private final AbstractBufferHashGrouper<KeyType> grouper;

Review Comment:
   For this, I will need to maintain the AbstractBufferHashGrouper. The reason 
will also address why `getMergeBufferUsedBytes` is not placed in the `Groupers` 
interface.
   
   This is because the groupby metrics are only collated when `Groupers#close` 
is called. This means that we will not be interfacing with 
`Groupers#getMergeBufferUsedBytes` at all, but letting `Groupers#close` 
retrieve `getMergeBufferUsedBytes`. This is why 
`SpillingGrouper#getMergeBufferUsedBytes` is private, following the example set 
by `SpillingGrouper#getDictionarySizeEstimate`. 
   
   The only time we need to interface with `getMergeBufferUsedBytes` is in 
`AbstractBufferHashGrouper`, which are the underlying groupers used by the 
`SpillingGrouper`.



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

Reply via email to