jacktengg commented on code in PR #61212:
URL: https://github.com/apache/doris/pull/61212#discussion_r2937746471


##########
be/src/exec/operator/partitioned_aggregation_source_operator.h:
##########
@@ -93,10 +149,23 @@ class PartitionedAggSourceOperatorX : public 
OperatorX<PartitionedAggLocalState>
     bool is_colocated_operator() const override;
     bool is_shuffled_operator() const override;
 
+    // Returns the current in-memory hash table size for the active partition.
+    // The scheduler uses this to decide whether to trigger revoke_memory.
+    size_t revocable_mem_size(RuntimeState* state) const override;
+
+    // Called by the pipeline task scheduler under memory pressure. Flushes the
+    // current in-memory aggregation hash table to sub-spill-files and 
repartitions,
+    // freeing the hash table memory so it can be recovered in smaller slices.
+    Status revoke_memory(RuntimeState* state) override;
+
 private:
     friend class PartitionedAggLocalState;
 
     std::unique_ptr<AggSourceOperatorX> _agg_source_operator;
+    // number of spill partitions configured for this operator
+    size_t _partition_count = 0;
+    // max repartition depth (configured from session variable in FE)
+    size_t _repartition_max_depth = SpillRepartitioner::MAX_DEPTH;

Review Comment:
   Should be type int, as in 
be/src/exec/operator/partitioned_hash_join_probe_operator.h



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