Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comment](sort) Add some comments for sort_column #44024

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions be/src/vec/columns/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,20 @@ class IColumn : public COW<IColumn> {
/// If the only value column can contain is NULL.
virtual bool only_null() const { return false; }

/**
* ColumnSorter is used to sort each columns in a Block. In this sorting pattern, sorting a
* column will produce a list of EqualRange which has the same elements respectively. And for
* next column in this block, we only need to sort rows in those `range`.
*
* Besides, we do not materialize sorted data eagerly. Instead, the intermediate sorting results
* are represendted by permutation and data will be materialized after all of columns are sorted.
*
* @sorter: ColumnSorter is used to do sorting.
* @flags : indicates if current item equals to the previous one.
* @perms : permutation after sorting
* @range : EqualRange which has the same elements respectively.
* @last_column : indicates if this column is the last in this block.
*/
virtual void sort_column(const ColumnSorter* sorter, EqualFlags& flags,
IColumn::Permutation& perms, EqualRange& range,
bool last_column) const;
Expand Down
Loading