HappenLee commented on a change in pull request #8186:
URL: https://github.com/apache/incubator-doris/pull/8186#discussion_r811588056
##########
File path: be/src/vec/olap/vgeneric_iterators.cpp
##########
@@ -166,6 +166,15 @@ class VMergeIteratorContext {
if (cmp_res != 0) {
return cmp_res > 0;
}
+
+ if (_sequence_id_idx != -1) {
+ int col_cmp_res = this->_block.compare_column_at(_index_in_block,
rhs._index_in_block, _sequence_id_idx, rhs._block, -1);
+ auto left_col =
this->_block.get_by_position(_sequence_id_idx).column;
Review comment:
the `left_col` and `right_col` look like unless, maybe not need to add
method of `_block.compare_column_at`. direct use left_col method `compare_at`
function look more pretty?
##########
File path: be/src/vec/core/block.h
##########
@@ -273,6 +273,14 @@ class Block {
return 0;
}
+ //note(wb) no DCHECK here, because this method is only used after
compare_at now, so no need to repeat check here.
+ // If this method is used in more places, you can add DCHECK case by case.
+ int compare_column_at(size_t n, size_t m, size_t col_idx, const Block&
rhs, int nan_direction_hint) const {
Review comment:
why not directly use the coiumn method `compare_at` ?
--
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]