You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/04/18 11:57:50 UTC

[incubator-doris] 11/17: [Bug][Vectorized] Fix UB when doing ORDER BY. (#9023)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit acb88f707582a77c7fae2b3de40abb2fea0f220f
Author: Amos Bird <am...@gmail.com>
AuthorDate: Fri Apr 15 14:02:29 2022 +0800

    [Bug][Vectorized] Fix UB when doing ORDER BY. (#9023)
---
 be/src/vec/core/sort_cursor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/vec/core/sort_cursor.h b/be/src/vec/core/sort_cursor.h
index 54557f1ceb..6a505c86d8 100644
--- a/be/src/vec/core/sort_cursor.h
+++ b/be/src/vec/core/sort_cursor.h
@@ -222,7 +222,7 @@ struct SortBlockCursor {
     }
 
     /// Inverted so that the priority queue elements are removed in ascending order.
-    bool operator<(const SortBlockCursor& rhs) const { return less_at(rhs, impl->rows - 1) >= 0; }
+    bool operator<(const SortBlockCursor& rhs) const { return less_at(rhs, impl->rows - 1) == 1; }
 };
 
 } // namespace doris::vectorized


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org