SubhamSinghal commented on code in PR #25468:
URL: https://github.com/apache/datafusion/pull/25468#discussion_r4052466247
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -2314,26 +2361,60 @@ impl PartitionedTopKDenseRank {
let mut coalescer = BatchCoalescer::new(Arc::clone(&schema),
batch_size);
Review Comment:
addressed in e580f216bdfe07ddaa14131339223bed4f933e9f
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1952,29 +1952,73 @@ struct DenseRankPartitionState {
/// INVARIANT: `keys` and `groups.keys()` hold the same set. Every
/// insertion into / removal from `groups` must mirror into `keys`.
keys: BinaryHeap<Vec<u8>>,
+ /// Running total of the heap allocations owned by the *contents* of
+ /// `groups` and `keys`: the key bytes, the per-key `Vec<GroupEntry>`
+ /// buffers, and each entry's `row_indices`. Excludes the two
+ /// containers' own tables, which `capacity()` reports in O(1).
+ ///
+ /// INVARIANT: equals `recompute_contents_bytes` (test-only, so not
+ /// linkable from rustdoc). Every mutation of `groups` or `keys` must
+ /// adjust it; the `dense_rank_contents_bytes_tracks_recompute` test
Review Comment:
addressed in
https://github.com/apache/datafusion/commit/e580f216bdfe07ddaa14131339223bed4f933e9f
--
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]