You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/27 15:37:44 UTC
(doris) branch branch-2.0 updated: [fix](vec) wrong implementation of operator <=> of Field (#29743) (#31452)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 5686a0d9695 [fix](vec) wrong implementation of operator <=> of Field (#29743) (#31452)
5686a0d9695 is described below
commit 5686a0d96955b57a3d849b32c7b6a9c74af0195d
Author: Jerry Hu <mr...@gmail.com>
AuthorDate: Tue Feb 27 23:37:37 2024 +0800
[fix](vec) wrong implementation of operator <=> of Field (#29743) (#31452)
---
be/src/vec/core/field.h | 2 +-
be/src/vec/exec/vsort_node.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/core/field.h b/be/src/vec/core/field.h
index d9bb6ce6624..a0a4f13368b 100644
--- a/be/src/vec/core/field.h
+++ b/be/src/vec/core/field.h
@@ -511,7 +511,7 @@ public:
std::strong_ordering operator<=>(const Field& rhs) const {
if (which == Types::Null || rhs == Types::Null) {
- return std::strong_ordering::equal;
+ return which <=> rhs.which;
}
if (which != rhs.which) {
LOG(FATAL) << "lhs type not equal with rhs, lhs=" << Types::to_string(which)
diff --git a/be/src/vec/exec/vsort_node.cpp b/be/src/vec/exec/vsort_node.cpp
index f4eaafe634a..45ef327dd37 100644
--- a/be/src/vec/exec/vsort_node.cpp
+++ b/be/src/vec/exec/vsort_node.cpp
@@ -144,7 +144,7 @@ Status VSortNode::sink(RuntimeState* state, vectorized::Block* input_block, bool
// update runtime predicate
if (_use_topn_opt) {
Field new_top = _sorter->get_top_value();
- if (!new_top.is_null() && (old_top.is_null() || new_top != old_top)) {
+ if (!new_top.is_null() && new_top != old_top) {
auto& sort_description = _sorter->get_sort_description();
auto col = input_block->get_by_position(sort_description[0].column_number);
bool is_reverse = sort_description[0].direction < 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org