crepererum commented on code in PR #3386:
URL: https://github.com/apache/arrow-datafusion/pull/3386#discussion_r965676167
##########
datafusion/core/src/physical_plan/sorts/sort_preserving_merge.rs:
##########
@@ -321,10 +318,13 @@ pub(crate) struct SortPreservingMergeStream {
next_batch_id: usize,
/// min heap for record comparison
- min_heap: BinaryHeap<SortKeyCursor>,
+ max_heap: BinaryHeap<Reverse<SortKeyCursor>>,
Review Comment:
Well, we get into philosophical discussions here, but IMHO the variable
should describe the entire construct (`BinaryHeap<Reverse<SortKeyCursor>>`),
not just the outer shell (`BinaryHeap<...>`).
Should you decide the keep the name, then at least adjust the docstring
which still read `min heap`.
--
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]