You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "eldenmoon (via GitHub)" <gi...@apache.org> on 2023/04/24 02:38:43 UTC

[GitHub] [doris] eldenmoon opened a new pull request, #18984: [Bug](topn opt) Fix be crash when enable topn opt with larger thresho…

eldenmoon opened a new pull request, #18984:
URL: https://github.com/apache/doris/pull/18984

   …… (#18858)
   
   topn opt should be inited when update it
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

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] [doris] github-actions[bot] commented on a diff in pull request #18984: [Bug](topn opt) Fix be crash when enable topn opt with larger thresho…

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18984:
URL: https://github.com/apache/doris/pull/18984#discussion_r1174730649


##########
be/src/vec/exec/vsort_node.cpp:
##########
@@ -81,6 +58,30 @@ Status VSortNode::init(const TPlanNode& tnode, RuntimeState* state) {
         _sorter.reset(new FullSorter(_vsort_exec_exprs, _limit, _offset, _pool, _is_asc_order,
                                      _nulls_first, row_desc, state, _runtime_profile.get()));
     }
+    // init runtime predicate
+    _use_topn_opt = tnode.sort_node.use_topn_opt;
+    if (_use_topn_opt) {
+        auto query_ctx = state->get_query_fragments_ctx();
+        auto first_sort_expr_node = tnode.sort_node.sort_info.ordering_exprs[0].nodes[0];
+        if (first_sort_expr_node.node_type == TExprNodeType::SLOT_REF) {
+            auto first_sort_slot = first_sort_expr_node.slot_ref;
+            for (auto tuple_desc : this->row_desc().tuple_descriptors()) {
+                if (tuple_desc->id() != first_sort_slot.tuple_id) {
+                    continue;
+                }
+                for (auto slot : tuple_desc->slots()) {
+                    if (slot->id() == first_sort_slot.slot_id) {
+                        RETURN_IF_ERROR(query_ctx->get_runtime_predicate().init(slot->type().type,

Review Comment:
   warning: too many arguments to function call, expected 1, have 2; did you mean 'config::init'? [clang-diagnostic-error]
   
   ```suggestion
                           RETURN_IF_ERROR(query_ctx->get_runtime_predicate().config::init(slot->type().type,
   ```
   **be/src/common/status.h:507:** expanded from macro 'RETURN_IF_ERROR'
   ```cpp
           Status _status_ = (stmt);       \
                              ^
   ```
   **be/src/common/configbase.h:173:** 'config::init' declared here
   ```cpp
   bool init(const char* conf_file, bool fill_conf_map = false, bool must_exist = true,
        ^
   ```
   



-- 
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: commits-unsubscribe@doris.apache.org

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] [doris] yiguolei merged pull request #18984: [Bug](topn opt) Fix be crash when enable topn opt with larger thresho…

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #18984:
URL: https://github.com/apache/doris/pull/18984


-- 
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: commits-unsubscribe@doris.apache.org

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