You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/28 09:31:07 UTC
[GitHub] [incubator-doris] stdpain opened a new pull request #5313: [optimization] use replace top instead of push pop in priority #5312
stdpain opened a new pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313
## Proposed changes
referen to #5312
## Types of changes
What types of changes does your code introduce to Doris?
_Put an `x` in the boxes that apply_
- [] Bugfix (non-breaking change which fixes an issue)
- [] New feature (non-breaking change which adds functionality)
- [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [] Documentation Update (if none of the other choices apply)
- [x] Code refactor (Modify the code structure, format the code, etc...)
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [x] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
- [x] Compiling and unit tests pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] If these changes need document changes, I have updated the document
- [x] Any dependent changes have been merged
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r568368736
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
+class SortingHeap {
+public:
+ SortingHeap(const _Compare& comp) : _comp(comp) {}
+
+ bool is_valid() const { return !_queue.empty(); }
+
+ T top() { return _queue.front(); }
+
+ size_t size() { return _queue.size(); }
+
+ bool empty() { return _queue.empty(); }
+
+ T& next_child() { return _queue[_next_child_index()]; }
+
+ void replace_top(T new_top) {
+ *_queue.begin() = new_top;
+ update_top();
+ }
+
+ void remove_top() {
+ std::pop_heap(_queue.begin(), _queue.end(), _comp);
+ _queue.pop_back();
+ _next_idx = 0;
+ }
+
+ void push(T cursor) {
+ _queue.emplace_back(cursor);
+ std::push_heap(_queue.begin(), _queue.end(), _comp);
+ _next_idx = 0;
+ }
+
+ _Sequence&& sorted_seq() {
+ std::sort_heap(_queue.begin(), _queue.end(), _comp);
+ return std::move(_queue);
+ }
+
+private:
+ _Sequence _queue;
+ _Compare _comp;
+
+ /// Cache comparison between first and second child if the order in queue has not been changed.
+ size_t _next_idx = 0;
+
+ size_t _next_child_index() {
+ if (_next_idx == 0) {
+ _next_idx = 1;
+ if (_queue.size() > 2 && _comp(_queue[1], _queue[2])) ++_next_idx;
+ }
+
+ return _next_idx;
+ }
+
+ void update_top() {
+ size_t size = _queue.size();
+ if (size < 2) return;
+
+ auto begin = _queue.begin();
+
+ size_t child_idx = _next_child_index();
+ auto child_it = begin + child_idx;
+
+ /// Check if we are in order.
+ //if (*child_it < *begin) return;
+ if (_comp(*child_it, *begin)) return;
+
+ _next_idx = 0;
+
+ auto curr_it = begin;
+ auto top(std::move(*begin));
Review comment:
remove unless std::move.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
morningman merged pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] yangzhg commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r565986965
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,122 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
+class SortingHeap {
+public:
+ SortingHeap(const _Compare& comp) : _comp(comp) {}
+
+ bool isValid() const { return !_queue.empty(); }
Review comment:
```suggestion
bool is_valid() const { return !_queue.empty(); }
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r568368736
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
+class SortingHeap {
+public:
+ SortingHeap(const _Compare& comp) : _comp(comp) {}
+
+ bool is_valid() const { return !_queue.empty(); }
+
+ T top() { return _queue.front(); }
+
+ size_t size() { return _queue.size(); }
+
+ bool empty() { return _queue.empty(); }
+
+ T& next_child() { return _queue[_next_child_index()]; }
+
+ void replace_top(T new_top) {
+ *_queue.begin() = new_top;
+ update_top();
+ }
+
+ void remove_top() {
+ std::pop_heap(_queue.begin(), _queue.end(), _comp);
+ _queue.pop_back();
+ _next_idx = 0;
+ }
+
+ void push(T cursor) {
+ _queue.emplace_back(cursor);
+ std::push_heap(_queue.begin(), _queue.end(), _comp);
+ _next_idx = 0;
+ }
+
+ _Sequence&& sorted_seq() {
+ std::sort_heap(_queue.begin(), _queue.end(), _comp);
+ return std::move(_queue);
+ }
+
+private:
+ _Sequence _queue;
+ _Compare _comp;
+
+ /// Cache comparison between first and second child if the order in queue has not been changed.
+ size_t _next_idx = 0;
+
+ size_t _next_child_index() {
+ if (_next_idx == 0) {
+ _next_idx = 1;
+ if (_queue.size() > 2 && _comp(_queue[1], _queue[2])) ++_next_idx;
+ }
+
+ return _next_idx;
+ }
+
+ void update_top() {
+ size_t size = _queue.size();
+ if (size < 2) return;
+
+ auto begin = _queue.begin();
+
+ size_t child_idx = _next_child_index();
+ auto child_it = begin + child_idx;
+
+ /// Check if we are in order.
+ //if (*child_it < *begin) return;
+ if (_comp(*child_it, *begin)) return;
+
+ _next_idx = 0;
+
+ auto curr_it = begin;
+ auto top(std::move(*begin));
Review comment:
remove unless std::move.
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
Review comment:
no need add "_" in type name
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r568368979
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
Review comment:
no need add "_" in type name
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] yangzhg commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r565988323
##########
File path: be/src/exec/topn_node.h
##########
@@ -101,12 +102,8 @@ class TopNNode : public ExecNode {
// Number of rows skipped. Used for adhering to _offset.
int64_t _num_rows_skipped;
- // The priority queue will never have more elements in it than the LIMIT. The stl
- // priority queue doesn't support a max size, so to get that functionality, the order
- // of the queue is the opposite of what the ORDER BY clause specifies, such that the top
- // of the queue is the last sorted element.
- boost::scoped_ptr<std::priority_queue<Tuple*, std::vector<Tuple*>, TupleRowComparator>>
- _priority_queue;
+ // The priority queue will never have more elements in it than the LIMIT.
+ boost::scoped_ptr<SortingHeap<Tuple*, std::vector<Tuple*>, TupleRowComparator>> _priority_queue;
Review comment:
```suggestion
std::unique_ptr<SortingHeap<Tuple*, std::vector<Tuple*>, TupleRowComparator>> _priority_queue;
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] stdpain commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
stdpain commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r567629275
##########
File path: be/src/exec/topn_node.h
##########
@@ -101,12 +102,8 @@ class TopNNode : public ExecNode {
// Number of rows skipped. Used for adhering to _offset.
int64_t _num_rows_skipped;
- // The priority queue will never have more elements in it than the LIMIT. The stl
- // priority queue doesn't support a max size, so to get that functionality, the order
- // of the queue is the opposite of what the ORDER BY clause specifies, such that the top
- // of the queue is the last sorted element.
- boost::scoped_ptr<std::priority_queue<Tuple*, std::vector<Tuple*>, TupleRowComparator>>
- _priority_queue;
+ // The priority queue will never have more elements in it than the LIMIT.
+ std::unique_ptr<SortingHeap<Tuple*, std::vector<Tuple*>, TupleRowComparator>> _priority_queue;
Review comment:
SortingHeap is essentially a priority queue, but with a replace_top interface, so naming it as a priority queue is more friendly to people who come into contact with this code for the first time
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #5313: [optimization] use replace top instead of push pop in priority #5312
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #5313:
URL: https://github.com/apache/incubator-doris/pull/5313#discussion_r566575619
##########
File path: be/src/exec/topn_node.cpp
##########
@@ -180,17 +177,18 @@ Status TopNNode::close(RuntimeState* state) {
// Insert if either not at the limit or it's a new TopN tuple_row
void TopNNode::insert_tuple_row(TupleRow* input_row) {
- Tuple* insert_tuple = NULL;
-
if (_priority_queue->size() < _offset + _limit) {
+ Tuple* insert_tuple = nullptr;
insert_tuple = reinterpret_cast<Tuple*>(
Review comment:
auto* insert_tuple
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
+class SortingHeap {
+public:
+ SortingHeap(const _Compare& comp) : _comp(comp) {}
+
+ bool is_valid() const { return !_queue.empty(); }
+
+ T& current() { return _queue.front(); }
+
+ size_t size() { return _queue.size(); }
+
+ bool empty() { return _queue.empty(); }
+
+ T& next_child() { return _queue[_next_child_index()]; }
+
+ void replace_top(T new_top) {
+ current() = new_top;
+ updateTop();
+ }
+
+ void remove_top() {
+ std::pop_heap(_queue.begin(), _queue.end(), _comp);
+ _queue.pop_back();
+ next_idx = 0;
+ }
+
+ void push(T cursor) {
+ _queue.emplace_back(cursor);
+ std::push_heap(_queue.begin(), _queue.end(), _comp);
+ next_idx = 0;
+ }
+
+ _Sequence&& sorted_seq() {
+ std::sort_heap(_queue.begin(), _queue.end(), _comp);
+ return std::move(_queue);
+ }
+
+private:
+ _Sequence _queue;
+ _Compare _comp;
+
+ /// Cache comparison between first and second child if the order in queue has not been changed.
+ size_t next_idx = 0;
Review comment:
_next_idx
##########
File path: be/src/util/sort_heap.h
##########
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+#include <algorithm>
+#include <cassert>
+#include <queue>
+#include <utility>
+
+#include "common/compiler_util.h"
+
+namespace doris {
+
+template <typename T, typename _Sequence, typename _Compare>
+class SortingHeap {
+public:
+ SortingHeap(const _Compare& comp) : _comp(comp) {}
+
+ bool is_valid() const { return !_queue.empty(); }
+
+ T& current() { return _queue.front(); }
+
+ size_t size() { return _queue.size(); }
+
+ bool empty() { return _queue.empty(); }
+
+ T& next_child() { return _queue[_next_child_index()]; }
+
+ void replace_top(T new_top) {
+ current() = new_top;
+ updateTop();
+ }
+
+ void remove_top() {
+ std::pop_heap(_queue.begin(), _queue.end(), _comp);
+ _queue.pop_back();
+ next_idx = 0;
+ }
+
+ void push(T cursor) {
+ _queue.emplace_back(cursor);
+ std::push_heap(_queue.begin(), _queue.end(), _comp);
+ next_idx = 0;
+ }
+
+ _Sequence&& sorted_seq() {
+ std::sort_heap(_queue.begin(), _queue.end(), _comp);
+ return std::move(_queue);
+ }
+
+private:
+ _Sequence _queue;
+ _Compare _comp;
+
+ /// Cache comparison between first and second child if the order in queue has not been changed.
+ size_t next_idx = 0;
+
+ size_t _next_child_index() {
+ if (next_idx == 0) {
+ next_idx = 1;
+ if (_queue.size() > 2 && _comp(_queue[1], _queue[2])) ++next_idx;
+ }
+
+ return next_idx;
+ }
+
+ void updateTop() {
Review comment:
do not use Name Rule like JAVA
##########
File path: be/src/exec/topn_node.h
##########
@@ -101,12 +102,8 @@ class TopNNode : public ExecNode {
// Number of rows skipped. Used for adhering to _offset.
int64_t _num_rows_skipped;
- // The priority queue will never have more elements in it than the LIMIT. The stl
- // priority queue doesn't support a max size, so to get that functionality, the order
- // of the queue is the opposite of what the ORDER BY clause specifies, such that the top
- // of the queue is the last sorted element.
- boost::scoped_ptr<std::priority_queue<Tuple*, std::vector<Tuple*>, TupleRowComparator>>
- _priority_queue;
+ // The priority queue will never have more elements in it than the LIMIT.
+ std::unique_ptr<SortingHeap<Tuple*, std::vector<Tuple*>, TupleRowComparator>> _priority_queue;
Review comment:
Do not use the older name of `_priority_queue`, replace with `SortingHeap`
##########
File path: be/src/exec/topn_node.cpp
##########
@@ -180,17 +177,18 @@ Status TopNNode::close(RuntimeState* state) {
// Insert if either not at the limit or it's a new TopN tuple_row
void TopNNode::insert_tuple_row(TupleRow* input_row) {
- Tuple* insert_tuple = NULL;
-
if (_priority_queue->size() < _offset + _limit) {
+ Tuple* insert_tuple = nullptr;
insert_tuple = reinterpret_cast<Tuple*>(
_tuple_pool->allocate(_materialized_tuple_desc->byte_size()));
insert_tuple->materialize_exprs<false>(input_row, *_materialized_tuple_desc,
_sort_exec_exprs.sort_tuple_slot_expr_ctxs(),
_tuple_pool.get(), NULL, NULL);
+ _priority_queue->push(insert_tuple);
} else {
+ Tuple* insert_tuple = nullptr;
DCHECK(!_priority_queue->empty());
- Tuple* top_tuple = _priority_queue->top();
+ Tuple* top_tuple = _priority_queue->current();
Review comment:
The same to up
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org