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/03/02 02:19:21 UTC

[incubator-doris] branch master updated: [fix][Vectorized] Fix exchange node merge sort null first order wrong (#8291)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new b241bc4  [fix][Vectorized] Fix exchange node merge sort null first order wrong (#8291)
b241bc4 is described below

commit b241bc4e9dfe5893a4292fe7671cf33ff9629718
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Wed Mar 2 10:19:06 2022 +0800

    [fix][Vectorized] Fix exchange node merge sort null first order wrong (#8291)
---
 be/src/vec/core/sort_cursor.h             | 2 +-
 be/src/vec/runtime/vsorted_run_merger.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/core/sort_cursor.h b/be/src/vec/core/sort_cursor.h
index d9712b4..54557f1 100644
--- a/be/src/vec/core/sort_cursor.h
+++ b/be/src/vec/core/sort_cursor.h
@@ -118,7 +118,7 @@ struct ReceiveQueueSortCursorImpl : public SortCursorImpl {
         desc.resize(ordering_expr.size());
         for (int i = 0; i < desc.size(); i++) {
             desc[i].direction = is_asc_order[i] ? 1 : -1;
-            desc[i].nulls_direction = nulls_first[i] ? -1 : 1;
+            desc[i].nulls_direction = nulls_first[i] ? -desc[i].direction : desc[i].direction;
         }
         _is_eof = !has_next_block();
     }
diff --git a/be/src/vec/runtime/vsorted_run_merger.cpp b/be/src/vec/runtime/vsorted_run_merger.cpp
index 3332085..0d0ecc0 100644
--- a/be/src/vec/runtime/vsorted_run_merger.cpp
+++ b/be/src/vec/runtime/vsorted_run_merger.cpp
@@ -41,7 +41,7 @@ VSortedRunMerger::VSortedRunMerger(const std::vector<VExprContext *>& ordering_e
 }
 
 Status VSortedRunMerger::prepare(const vector<BlockSupplier>& input_runs, bool parallel) {
-    for (const auto &supplier : input_runs) {
+    for (const auto& supplier : input_runs) {
         _cursors.emplace_back(supplier, _ordering_expr, _is_asc_order, _nulls_first);
     }
 

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